Skip to content

Commit

Permalink
chore: 🤖 requirement & flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhaoQi99 committed Aug 27, 2024
1 parent 823f84b commit 491f151
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 19 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,8 @@ jobs:
- name: Install dependencies
run: |
pip install --upgrade pip
pip install setuptools==57.5.0
pip install -r dev-requirement.txt
pip install .
pip install setuptools -U
pip install .[dev]
- name: Lint with flake8
run: |
Expand Down
6 changes: 0 additions & 6 deletions dev-requirement.txt

This file was deleted.

6 changes: 3 additions & 3 deletions pyencrypt/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
{__description__}
VERSION {__version__}
"""
""" # noqa: E221,E222

KEY_OPTION_HELP = """
Your encryption key.If you don't specify key,
Expand All @@ -52,8 +52,8 @@
Encryption completed {SUCCESS_ANSI}.
Please copy {LOADER_FILE_NAME} into your encrypted directory.
And then remove `encrypted` directory.
Finally, add `import loader` at the top of your entry file.\
"""
Finally, add `import loader` at the top of your entry file.\n
""" # noqa: W604

FINISH_DECRYPT_MSG = f"""
Decryption completed {SUCCESS_ANSI}. Your origin source code has be put: {{work_dir}}
Expand Down
2 changes: 1 addition & 1 deletion pyencrypt/license.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def get_signature(data: bytes) -> str:


def _combine_data(data: dict) -> bytes:
return "*".join(map(lambda x: f"{x}:{data[x]}", FIELDS)).encode()
return "*".join(map(lambda x: f"{x}:{data[x]}", FIELDS)).encode() # noqa: E231


def generate_license_file(
Expand Down
4 changes: 2 additions & 2 deletions pyencrypt/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ def find_spec(
) -> ModuleSpec:
if path:
if isinstance(path, _NamespacePath):
file_path = Path(path._path[0]) / f'{fullname.rsplit(".",1)[-1]}.pye'
file_path = Path(path._path[0]) / f'{fullname.rsplit(".", 1)[-1]}.pye'
else:
file_path = Path(path[0]) / f'{fullname.rsplit(".",1)[-1]}.pye'
file_path = Path(path[0]) / f'{fullname.rsplit(".", 1)[-1]}.pye'
else:
for p in sys.path:
file_path = Path(p) / f"{fullname}.pye"
Expand Down
4 changes: 0 additions & 4 deletions requirement.txt

This file was deleted.

8 changes: 8 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ packages = find:
# package_dir =
# = src

[options.extras_require]
dev:
isort
black
pytest
ipython
flake8

[options.packages.find]
# where = src
exclude =
Expand Down

0 comments on commit 491f151

Please sign in to comment.