Skip to content

Commit

Permalink
build: remove unused noqa comments and adjust Python version
Browse files Browse the repository at this point in the history
Remove unnecessary noqa comments for cleaner code. Update minimum required
Python version to 3.11 in configuration files and dependencies.
Adjust line breaks for longer commented URLs.
  • Loading branch information
Septimus4 committed Nov 6, 2024
1 parent a41027b commit e8ea4c8
Show file tree
Hide file tree
Showing 15 changed files with 1,180 additions and 1,173 deletions.
2,309 changes: 1,156 additions & 1,153 deletions poetry.lock

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ packages = [
]

[tool.poetry.dependencies]
python = "^3.12"
python = ">=3.11"
bertopic = "^0.16.4"
llvmlite = "0.43.0"
numba = "0.60"
Expand All @@ -21,6 +21,7 @@ nltk = "^3.9.1"
neomodel = "^5.3.3"

[tool.poetry.group.dev.dependencies]
python = ">=3.11"
pytest = "^8.3.3"
flake8 = "^7.1.1"
pre-commit = "^4.0.1"
Expand Down
8 changes: 4 additions & 4 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ version = 1.0.0
description = API for Concord, an AI-powered semantic extraction and recommendation platform for networked communities.
long_description = file: README.md
keywords = OpenAPI Concord API
python_requires = >= 3.12.*
python_requires = >= 3.11.*
classifiers =
Operating System :: OS Independent
Programming Language :: Python :: 3
Programming Language :: Python :: 3.12
Programming Language :: Python :: 3.11

[options]
install_requires = fastapi[all]
Expand All @@ -21,8 +21,8 @@ where = src

[flake8]
max-line-length = 120
extend-ignore = E203, W503, E501
exclude = .git,__pycache__,__init__.py,.mypy_cache,.pytest_cache,.venv
extend-ignore = E203, W503
exclude = .git,__pycache__,__init__.py,.mypy_cache,.pytest_cache,.venv,src/concord/

[style]
based_on_style = pep8
Expand Down
2 changes: 1 addition & 1 deletion src/concord/server/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

app = FastAPI(
title="Concord API",
description= # noqa: E251
description=
"API for Concord, an AI-powered semantic extraction and recommendation platform for networked communities.",
version="1.0.0",
)
Expand Down
2 changes: 1 addition & 1 deletion src/concord/server/models/channel_messages_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import re # noqa: F401
import json

from pydantic import BaseModel, ConfigDict, Field, StrictStr # noqa: F401
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
try:
from typing import Self
Expand Down
2 changes: 1 addition & 1 deletion src/concord/server/models/channel_messages_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import re # noqa: F401
import json

from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt # noqa: F401
from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt
from typing import Any, ClassVar, Dict, List, Optional
try:
from typing import Self
Expand Down
2 changes: 1 addition & 1 deletion src/concord/server/models/channel_related_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import re # noqa: F401
import json

from pydantic import BaseModel, ConfigDict # noqa: F401
from pydantic import BaseModel, ConfigDict
from typing import Any, ClassVar, Dict, List, Optional
from concord.server.models.related_channel import RelatedChannel
try:
Expand Down
2 changes: 1 addition & 1 deletion src/concord/server/models/channel_topics_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import re # noqa: F401
import json

from pydantic import BaseModel, ConfigDict, StrictStr # noqa: F401
from pydantic import BaseModel, ConfigDict, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
try:
from typing import Self
Expand Down
2 changes: 1 addition & 1 deletion src/concord/server/models/related_channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import re # noqa: F401
import json

from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt, StrictStr # noqa: F401
from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional, Union
try:
from typing import Self
Expand Down
2 changes: 1 addition & 1 deletion src/concord/server/models/server_register_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import re # noqa: F401
import json

from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator # noqa: F401
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List, Optional
try:
from typing import Self
Expand Down
2 changes: 1 addition & 1 deletion src/concord/server/models/server_register_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import re # noqa: F401
import json

from pydantic import BaseModel, ConfigDict, Field, StrictStr # noqa: F401
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
try:
from typing import Self
Expand Down
2 changes: 1 addition & 1 deletion src/concord/server/models/trending_topic.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import re # noqa: F401
import json

from pydantic import BaseModel, ConfigDict, StrictStr # noqa: F401
from pydantic import BaseModel, ConfigDict, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from concord.server.models.related_channel import RelatedChannel
try:
Expand Down
2 changes: 1 addition & 1 deletion src/concord/server/models/trending_topics_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import re # noqa: F401
import json

from pydantic import BaseModel, ConfigDict, StrictStr # noqa: F401
from pydantic import BaseModel, ConfigDict, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from concord.server.models.trending_topic import TrendingTopic
try:
Expand Down
4 changes: 2 additions & 2 deletions src/concord/server/security_api.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# coding: utf-8

from typing import List # noqa: F401
from typing import List

from fastapi import Depends, Security # noqa: F401
from fastapi.openapi.models import OAuthFlowImplicit, OAuthFlows # noqa: F401
Expand All @@ -11,4 +11,4 @@
)
from fastapi.security.api_key import APIKeyCookie, APIKeyHeader, APIKeyQuery # noqa: F401

from concord.server.models.extra_models import TokenModel # noqa: F401
from concord.server.models.extra_models import TokenModel
9 changes: 6 additions & 3 deletions tests/test_channels_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ def test_get_channel_topics(client: TestClient):
# uncomment below to make a request
# response = client.request(
# "GET",
# "/channels/{platform_id}/{channel_id}/topics".format(platform_id='platform_id_example', channel_id='channel_id_example'),
# "/channels/{platform_id}/{channel_id}/topics".format(platform_id='platform_id_example',
# channel_id='channel_id_example'),
# headers=headers,
# )

Expand All @@ -36,7 +37,8 @@ def test_get_related_channels(client: TestClient):
# uncomment below to make a request
# response = client.request(
# "GET",
# "/channels/{platform_id}/{channel_id}/related".format(platform_id='platform_id_example', channel_id='channel_id_example'),
# "/channels/{platform_id}/{channel_id}/related".format(platform_id='platform_id_example',
# channel_id='channel_id_example'),
# headers=headers,
# params=params,
# )
Expand All @@ -56,7 +58,8 @@ def test_post_channel_messages(client: TestClient):
# uncomment below to make a request
# response = client.request(
# "POST",
# "/channels/{platform_id}/{channel_id}/messages".format(platform_id='platform_id_example', channel_id='channel_id_example'),
# "/channels/{platform_id}/{channel_id}/messages".format(platform_id='platform_id_example',
# channel_id='channel_id_example'),
# headers=headers,
# json=channel_messages_request,
# )
Expand Down

0 comments on commit e8ea4c8

Please sign in to comment.