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

SoE: minor typing and style fixes #2724

Merged

Conversation

black-sliver
Copy link
Member

What is this fixing or adding?

Gets rid of almost all errors in CI: Analyze: mypy and flake8

Note:
for flake8, some of the functions are still "too complex". Worst being SoEWorld.create_regions with 19. This may need discussion since I don't think reducing complexity would make the code more readable.
for mypy we still have the missing type stub for the native code, so this is also still exit 1 for now.

How was this tested?

CI, it doesn't change actual code.

To support loading the module from source (rather than module) we import
pyevermizer from `__init__.py` in other files. This has been an implicit export
and `mypy --strict` disables implicit exports, so we export it explicitly now.
Copy link
Member

@Berserker66 Berserker66 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for flake8, some of the functions are still "too complex". Worst being SoEWorld.create_regions with 19.

I'm not a fan of this either, sometimes a thing just is complex and splitting it into bits just makes it worse.

@black-sliver black-sliver merged commit 518b04c into ArchipelagoMW:main Jan 15, 2024
12 checks passed
@black-sliver black-sliver deleted the soe-typing-and-style-fixes branch January 15, 2024 08:17
Jouramie pushed a commit to Jouramie/Archipelago that referenced this pull request Feb 28, 2024
* SoE: fix typing for tests

* SoE: explicitly export pyevermizer

To support loading the module from source (rather than module) we import
pyevermizer from `__init__.py` in other files. This has been an implicit export
and `mypy --strict` disables implicit exports, so we export it explicitly now.

* SoE: fix style in patch.py

* SoE: remove unused imports

* SoE: fix format mistakes

* SoE: cleaner typing in SoEOptions.flags

as suggested by beauxq
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

Successfully merging this pull request may close these issues.

None yet

2 participants