-
Notifications
You must be signed in to change notification settings - Fork 0
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
サポートするPythonバージョンを「3.8以上」から「3.9以上」に変更しました。 #137
Conversation
], | ||
// "poetry run"コマンドで実行することを想定しているので、venv環境を自動的にactivateしないようにする | ||
"python.terminal.activateEnvironment":false, | ||
|
||
"python.formatting.blackPath": ".venv/bin/black", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
VSCode 1.91.1で警告が出るので削除しました。
], | ||
"python.analysis.completeFunctionParens": true, | ||
"[python]": { | ||
"editor.formatOnSave": true, | ||
"editor.codeActionsOnSave": { | ||
"source.organizeImports": true | ||
"source.organizeImports": "explicit" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
VSCode 1.91.1の警告に従い修正しました。
@@ -20,7 +20,7 @@ def open_resource(self) -> Generator[Resource, None, None]: | |||
endpoint = ( | |||
self._annofab_endpoint if self._annofab_endpoint is not None else annofabapi.resource.DEFAULT_ENDPOINT_URL | |||
) | |||
resource = annofabapi.build(self._annofab_id, self._annofab_pass, endpoint) | |||
resource = annofabapi.build(self._annofab_id, self._annofab_pass, endpoint_url=endpoint) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
最新の annofabapi 0.74.0でエラーが出ないように修正しました。
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Topic :: Utilities", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
poetry build
でPython関係のclassifiersは自動で生成されるので、削除しました。
https://qiita.com/yuji38kwmt/items/dbf6d20666c054d84e14
@@ -7,7 +7,7 @@ | |||
|
|||
|
|||
def camelcase(cls: Type[A]) -> Type[A]: | |||
cls.dataclass_json_config = config(letter_case=LetterCase.CAMEL)["dataclasses_json"] # type: ignore | |||
cls.dataclass_json_config = config(letter_case=LetterCase.CAMEL)["dataclasses_json"] # type: ignore[assignment] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mypy 1.11では、type: ignore
だけではエラーが出るので、ignore[assignment}
と記載する
|
||
install: | ||
- pip install pip --upgrade | ||
- pip install poetry==1.1.15 setuptools==50.3.2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Poetryはsetupptolsは必須としていないので、削除しました。
https://python-poetry.org/docs/configuration#virtualenvsoptionsno-setuptools
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
直接仮想環境を作って&dev container内で仮想環境をつくって、lint / test が動いていることを確認した
VSCode Dev Containers
Dockerfile
の不要な設定(docker composeなど)を削除しました。devcontainer.json
で不要な設定を削除しました。pyproject.toml
pyproject.toml
: サポートするPythonバージョンを「3.8以上」から、「3.9以上」に変更しました。mypy
,flake8
,pylint
のバージョンを最新にしました。flake8
がPython3.12で動作しなかったためです。補足
先に #138 をマージしてから、このpull requestをマージします。