Skip to content

Suppress PEP warnings - #263

Closed
syntron wants to merge 9 commits into
OpenModelica:masterfrom
syntron:suppress_warnings
Closed

Suppress PEP warnings#263
syntron wants to merge 9 commits into
OpenModelica:masterfrom
syntron:suppress_warnings

Conversation

@syntron

@syntron syntron commented Apr 23, 2025

Copy link
Copy Markdown
Contributor

Purpose

PyCharm (and other IDE's?) are highlighting a lot of warnings in the OMPython files (default settings)

This PR reduces the number of warnings by using corresponding '# noinspection' comments.

  • unresolved references (in docstrings; due to old syntax based on non-class methods) => could be handled by the docstring cleanup planned by @ondras12345
  • suppress name schema warnings - upper letters in function names

Approach

just use '# noinspection' ...

This PR is defined on top of #257

syntron added 9 commits April 23, 2025 19:14
reason: cleanup; no need to use a sub-module / sub-directory
* dummy entries for the classes to move from __init__.py
* dummy entries for the classes to move from __init__.py
* fix imports based on merged changes
!! only copy & paste of the class definitions - *NO* further change !!

* OMCSessionBase => OMCSession.py
* OMCSessionZMQ => OMCSession.py
* ModelicaSystem => ModelicaSystem.py
* ModelicaSystemError => ModelicaSystem.py
reduce the number of warnings issued by PyCharm

* unresolved references (in docstrings; due to old syntax based
  on non-class methods)
* suppress name schema warnings - upper letters in function names
reduce the number of warnings issued by PyCharm

* suppress name schema warnings - upper letters in function names
@syntron syntron changed the title Suppress warnings Apr 23, 2025
@syntron

syntron commented Apr 24, 2025

Copy link
Copy Markdown
Contributor Author

I'm no longer sure that this is a good idea - this hides the (valid) messages of the linter; I think if these should be suppressed, it is something each developer could do on his/her own. Especially if done on the level of a class ...

@syntron syntron closed this Apr 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant