Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create requirements.txt file or add some guide text in README or somewhere for python packages #407

Closed
BaseMax opened this issue Dec 24, 2024 · 4 comments

Comments

@BaseMax
Copy link
Member

BaseMax commented Dec 24, 2024

python3 -m pip install -U mypy

C:\Files\Projects\Salam>python -m pip install -U mypy
Defaulting to user installation because normal site-packages is not writeable
Collecting mypy
  Using cached mypy-1.14.0-cp312-cp312-win_amd64.whl.metadata (2.2 kB)
Collecting typing_extensions>=4.6.0 (from mypy)
  Using cached typing_extensions-4.12.2-py3-none-any.whl.metadata (3.0 kB)
Collecting mypy_extensions>=1.0.0 (from mypy)
  Using cached mypy_extensions-1.0.0-py3-none-any.whl.metadata (1.1 kB)
Using cached mypy-1.14.0-cp312-cp312-win_amd64.whl (9.9 MB)
Using cached mypy_extensions-1.0.0-py3-none-any.whl (4.7 kB)
Using cached typing_extensions-4.12.2-py3-none-any.whl (37 kB)
Installing collected packages: typing_extensions, mypy_extensions, mypy
Successfully installed mypy-1.14.0 mypy_extensions-1.0.0 typing_extensions-4.12.2
@BaseMax
Copy link
Member Author

BaseMax commented Dec 24, 2024

How to test?

pre-commit run --all-files

mypy.....................................................................Failed
- hook id: mypy
- exit code: 1

config\module\utils.py:3: error: Library stubs not installed for "yaml"  [import-untyped]
config\layout\attribute\style\value.convert.py:1: error: Library stubs not installed for "yaml"  [import-untyped]
config\layout\attribute\style\value.convert.py:4: error: Function is missing a type annotation  [no-untyped-def]
config\admin\app.py:3: error: Library stubs not installed for "yaml"  [import-untyped]
config\admin\app.py:3: note: Hint: "python3 -m pip install types-PyYAML"
config\admin\app.py:3: note: (or run "mypy --install-types" to install all missing stub packages)
config\admin\app.py:3: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
config\admin\app.py:16: error: Function is missing a type annotation  [no-untyped-def]
config\admin\app.py:67: error: Incompatible return value type (got "set[Any]", expected "list[str]")  [return-value]
config\admin\app.py:134: error: Function is missing a return type annotation  [no-untyped-def]
config\sync.py:6: error: Library stubs not installed for "yaml"  [import-untyped]
config\sync.py:237: error: Unsupported operand types for + ("str" and "None")  [operator]
config\sync.py:237: note: Right operand is of type "Optional[Any]"
config\sync.py:272: error: Unsupported operand types for + ("str" and "None")  [operator]
config\sync.py:272: note: Right operand is of type "Optional[Any]"
config\sync.py:566: error: Function is missing a return type annotation  [no-untyped-def]
config\sync.py:580: error: Function is missing a type annotation  [no-untyped-def]
Found 12 errors in 4 files (checked 16 source files)

@jbampton
Copy link
Member

refs #304

@jbampton
Copy link
Member

refs #410

@BaseMax
Copy link
Member Author

BaseMax commented Dec 25, 2024

Many thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants