Skip to content
Snippets Groups Projects

Merge of check_tests_and_examples to dev

Merged Vincent Texier requested to merge check_tests_and_examples into dev
3 unresolved threads
  • Add mypy, pylint and black check on tests and examples folders
  • Fix mypy and pylint alerts in code
  • Black format tests and examples folders
  • Fix a bug in pubsec v1 load file function
Edited by Vincent Texier

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
14 14 # check static typing
15 15 mypy:
16 16 python3 -m mypy duniterpy --ignore-missing-imports
17 python3 -m mypy tests --ignore-missing-imports
18 python3 -m mypy examples --ignore-missing-imports
  • Moul
    Moul @moul started a thread on the diff
  • 14 14 # check static typing
    15 15 mypy:
    16 16 python3 -m mypy duniterpy --ignore-missing-imports
    17 python3 -m mypy tests --ignore-missing-imports
    18 python3 -m mypy examples --ignore-missing-imports
    17 19
    18 20 # check code errors
    19 21 pylint:
    20 pylint --disable=C,R0913,R0903,R0902,R0914,R0912,R0915,W0613 --enable=C0121,C0202,C0321 --jobs=0 duniterpy/
    22 pylint --disable=C,R0902,R0903,R0904,R0912,R0913,R0914,R0915,W0613 --enable=C0121,C0202,C0321 --jobs=0 duniterpy/
    23 pylint --disable=C,R0902,R0903,R0904,R0912,R0913,R0914,R0915,W0613 --enable=C0121,C0202,C0321 --jobs=0 tests/
    24 pylint --disable=C,R0902,R0903,R0904,R0912,R0913,R0914,R0915,W0613 --enable=C0121,C0202,C0321 --jobs=0 examples/
    • It's on purpose. I want that if the first command fail, the make recipe stop immediately and further commands are not uselessly started.

    • This three tools are treating the whole files and will anyway stop at first encountered error.

      So, we end up with lots of duplicate lines.

      I don’t get your point of having multiples calls.

    • Please register or sign in to reply
  • This three tools are treating the whole files and will anyway stop at first encountered error.

    This is incorrect, as I have experienced the opposite when implementing those commands.

    a make recipe (say pylint for example) only stop after a command line exit with a status code > 0

    So, with only one command line, the recipe will only stop after all folders have been checked, displaying all alerts at the end. This is not what I want.

    With 3 command lines, the recipe will stop at the first one.

    Edited by Vincent Texier
  • merged

  • Please register or sign in to reply
    Loading