Skip to content

Commit e69751b

Browse files
JacobCoffeeAlc-Was-TakenAlc-Alc
authored
feat: add astral ruff commands (#63)
* feat: add astral ruff commands * fix: make non blocking * chore: adjust docstring * docs: update docs for astral fix(docs): fix broken refs * Dropdown and some type changes (#64) * feat(astral-ruff): Drop down support for rules and faster rule lookup * fix?(astral-ruff): Chunking * chore(astral-ruff): replace `query_ruff_rule` with `query_all_ruff_rules` in `__all__` * oopsie:(astral-ruff): Missed call to `format_ruff_rule` * docs: fixed * Update src/byte/lib/utils.py --------- Co-authored-by: Alc-Alc <alc@localhost> Co-authored-by: Jacob Coffee <[email protected]> --------- Co-authored-by: Alc-Alc <[email protected]> Co-authored-by: Alc-Alc <alc@localhost>
1 parent f9ff9ad commit e69751b

File tree

19 files changed

+270
-35
lines changed

19 files changed

+270
-35
lines changed

docs/byte/api/plugins/astral.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
======
2+
astral
3+
======
4+
5+
.. automodule:: src.byte.plugins.astral
6+
:members:

docs/byte/api/plugins/events.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
======
2+
events
3+
======
4+
5+
.. automodule:: src.byte.plugins.events
6+
:members:

docs/byte/api/plugins/github.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
======
2-
events
2+
github
33
======
44

5-
.. automodule:: src.byte.plugins.events
5+
.. automodule:: src.byte.plugins.github
66
:members:

docs/byte/api/plugins/guild.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
======
2-
forums
3-
======
1+
=====
2+
guild
3+
=====
44

5-
.. automodule:: src.byte.plugins.forums
5+
.. automodule:: src.byte.plugins.guild
66
:members:

docs/byte/api/plugins/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ This includes things like commands, event handlers, and other features.
1010
:caption: Plugins
1111

1212
admin
13+
astral
14+
events
1315
general
1416
github
1517
guild

pyproject.toml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -206,23 +206,25 @@ warn_untyped_fields = true
206206
strict-imports = false
207207

208208
[tool.ruff]
209-
select = ["ALL"]
210-
ignore = ["ANN101", "ANN102", "ANN401", "PLR0913", "RUF012", "COM812", "ISC001", "ERA001", "TD", "FIX002"]
211209
line-length = 120
212210
src = ["src", "tests"]
213211
target-version = "py311"
214212

213+
[tool.ruff.lint]
214+
select = ["ALL"]
215+
ignore = ["ANN101", "ANN102", "ANN401", "PLR0913", "RUF012", "COM812", "ISC001", "ERA001", "TD", "FIX002"]
216+
215217
[tool.ruff.format]
216218
quote-style = "double"
217219
indent-style = "space"
218220

219-
[tool.ruff.pydocstyle]
221+
[tool.ruff.lint.pydocstyle]
220222
convention = "google"
221223

222-
[tool.ruff.mccabe]
224+
[tool.ruff.lint.mccabe]
223225
max-complexity = 12
224226

225-
[tool.ruff.pep8-naming]
227+
[tool.ruff.lint.pep8-naming]
226228
classmethod-decorators = [
227229
"classmethod",
228230
"pydantic.validator",
@@ -233,10 +235,10 @@ classmethod-decorators = [
233235
"sqlalchemy.orm.declared_attr",
234236
]
235237

236-
[tool.ruff.isort]
238+
[tool.ruff.lint.isort]
237239
known-first-party = ["src", "tests"]
238240

239-
[tool.ruff.per-file-ignores]
241+
[tool.ruff.lint.per-file-ignores]
240242
# Tests can use magic values, assertions, and relative imports
241243
"**/*.*" = [
242244
"ANN101",

src/byte/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from __future__ import annotations
33

44
from byte import bot, lib
5-
from byte.lib.logging import setup_logging
5+
from byte.lib.log import setup_logging
66

77
__all__ = ["bot", "lib"]
88

src/byte/bot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from dotenv import load_dotenv
1212

1313
from byte.lib import settings
14-
from byte.lib.logging import get_logger
14+
from byte.lib.log import get_logger
1515

1616
__all__ = [
1717
"Byte",

src/byte/lib/common.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,13 @@
1111
pypi_litestar: Final = "https://pypi.org/project/litestar/"
1212
pypi_polyfactory: Final = "https://pypi.org/project/polyfactory/"
1313
mcve: Final = "https://stackoverflow.com/help/minimal-reproducible-example"
14-
paste: Final = "https://paste.pythondiscord.com"
14+
pastebin: Final = "https://paste.pythondiscord.com"
1515
markdown_guide: Final = "https://support.discord.com/hc/en-us/articles/210298617-Markdown-Text-101-Chat-Formatting-Bold-Italic-Underline-#h_01GY0DAKGXDEHE263BCAYEGFJA"
1616

1717
# --- Assets
1818
litestar_logo_white: Final = "https://raw.githubusercontent.com/litestar-org/branding/main/assets/Branding%20-%20PNG%20-%20Transparent/Badge%20-%20White.png"
1919
litestar_logo_yellow: Final = "https://raw.githubusercontent.com/litestar-org/branding/main/assets/Branding%20-%20PNG%20-%20Transparent/Badge%20-%20Blue%20and%20Yellow.png"
20+
ruff_logo: Final = "https://raw.githubusercontent.com/JacobCoffee/byte/main/assets/ruff.png"
2021

2122
# --- Channel IDs
2223
litestar_help_channel: Final = 1064114019373432912

0 commit comments

Comments
 (0)