Skip to content

Commit e24def6

Browse files
Wizard1209Wizard1209droserasprout
authored
Add ruff linting and formatting to demo rendering (#1231)
* Add ruff linting and formatting to demo rendering * Refactor buildin ruff linting and formating * Add option to skip linter and formatter * fix * fix * test 'uv run' * Remove 'uv run' * find ruff executable * fix * update ruff executable handling * ignore type checking for ruff executable import * reorder application of ruff formatter and linter * reorder application of ruff formatter and linter * skip mystery test * lock * what a week huh? --------- Co-authored-by: Wizard1209 <[email protected]> Co-authored-by: Lev Gorodetskiy <[email protected]>
1 parent cf490d3 commit e24def6

File tree

14 files changed

+234
-164
lines changed

14 files changed

+234
-164
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@ The format is based on [Keep a Changelog], and this project adheres to [Semantic
66

77
Releases prior to 7.0 has been removed from this file to declutter search results; see the [archived copy](https://github.com/dipdup-io/dipdup/blob/8.0.0b5/CHANGELOG.md) for the full list.
88

9-
## [8.3.0] - 2025-05-01
9+
## [8.3.0] - 2025-05-02
1010

1111
### Added
1212

13+
- cli: Apply ruff linting and formating on init.
1314
- mcp: Added Model Context Protocol (MCP) server implementation.
1415
- mcp: Added built-in resources for accessing indexer configuration and metrics.
1516
- mcp: Added support for exposing custom tools and resources via `@dipdup.mcp` decorators.

Makefile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,9 @@ typeignore: ## Find type:ignore comments
8585
demos: ## Recreate demo projects from templates
8686
DIPDUP_NO_SYMLINK=1 python scripts/demos.py render ${DEMO}
8787
DIPDUP_NO_SYMLINK=1 python scripts/demos.py init ${DEMO}
88-
make format lint
8988

9089
demos_refresh:
91-
for demo in `ls src | grep demo | grep -v etherlink`; do cd src/$$demo && dipdup init -b -f && cd ../..; done
92-
make format lint
90+
for demo in `ls src | grep demo | grep -v etherlink`; do cd src/$$demo && DIPDUP_NO_SYMLINK=1 dipdup init -b -f && cd ../..; done
9391

9492
before_release: ## Prepare for a new release after updating version in pyproject.toml
9593
make format lint update demos test docs

docs/7.references/1.cli.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,12 @@ Discord: <a class="reference external" href="https://discord.gg/aG
193193
<dd><p>Include template base: pyproject.toml, Dockerfile, etc.</p>
194194
</dd></dl>
195195

196+
<dl class="std option">
197+
<dt class="sig sig-object std" id="cmdoption-dipdup-init-no-linter">
198+
<span class="sig-name descname"><span class="pre">--no-linter</span></span><span class="sig-prename descclassname"></span></dt>
199+
<dd><p>Skip linter and formatter.</p>
200+
</dd></dl>
201+
196202
<p class="rubric">Arguments</p>
197203
<dl class="std option">
198204
<dt class="sig sig-object std" id="cmdoption-dipdup-init-arg-PATH">

docs/9.release-notes/_8.3_changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
### Added
55

6+
- cli: Apply ruff linting and formating on init.
67
- mcp: Added Model Context Protocol (MCP) server implementation.
78
- mcp: Added built-in resources for accessing indexer configuration and metrics.
89
- mcp: Added support for exposing custom tools and resources via `@dipdup.mcp` decorators.

pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ dependencies = [
7171
"python-dotenv~=1.0",
7272
"python-json-logger~=2.0", # pinned
7373
"ruamel.yaml~=0.18.6",
74+
"ruff>=0.11.2",
7475
"sentry-sdk~=2.16",
7576
"sqlparse~=0.5",
7677
"starknet-py~=0.25.0", # pinned
@@ -154,9 +155,7 @@ build-backend = "uv_build"
154155

155156
[dependency-groups]
156157
lint = [
157-
"black",
158158
"mypy",
159-
"ruff",
160159
"types-pytz",
161160
"types-tabulate",
162161
]

requirements.txt

Lines changed: 85 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,24 @@ aerich==0.8.2 \
77
aiohappyeyeballs==2.6.1 \
88
--hash=sha256:c3f9d0113123803ccadfdf3f0faa505bc78e6a72d1cc4806cbd719826e943558 \
99
--hash=sha256:f349ba8f4b75cb25c99c5c2d84e997e485204d2902a9597802b0371f09331fb8
10-
aiohttp==3.11.14 \
11-
--hash=sha256:0b2501f1b981e70932b4a552fc9b3c942991c7ae429ea117e8fba57718cdeed0 \
12-
--hash=sha256:0df3788187559c262922846087e36228b75987f3ae31dd0a1e5ee1034090d42f \
13-
--hash=sha256:28a3d083819741592685762d51d789e6155411277050d08066537c5edc4066e6 \
14-
--hash=sha256:3a8a0d127c10b8d89e69bbd3430da0f73946d839e65fec00ae48ca7916a31948 \
15-
--hash=sha256:3b420d076a46f41ea48e5fcccb996f517af0d406267e31e6716f480a3d50d65c \
16-
--hash=sha256:3b512f1de1c688f88dbe1b8bb1283f7fbeb7a2b2b26e743bb2193cbadfa6f307 \
17-
--hash=sha256:41cf0cefd9e7b5c646c2ef529c8335e7eafd326f444cc1cdb0c47b6bc836f9be \
18-
--hash=sha256:51ba80d473eb780a329d73ac8afa44aa71dfb521693ccea1dea8b9b5c4df45ce \
19-
--hash=sha256:602d4db80daf4497de93cb1ce00b8fc79969c0a7cf5b67bec96fa939268d806a \
20-
--hash=sha256:70ab0f61c1a73d3e0342cedd9a7321425c27a7067bebeeacd509f96695b875fc \
21-
--hash=sha256:8aa5c68e1e68fff7cd3142288101deb4316b51f03d50c92de6ea5ce646e6c71f \
22-
--hash=sha256:8d1dd75aa4d855c7debaf1ef830ff2dfcc33f893c7db0af2423ee761ebffd22b \
23-
--hash=sha256:948abc8952aff63de7b2c83bfe3f211c727da3a33c3a5866a0e2cf1ee1aa950f \
24-
--hash=sha256:9e73fa341d8b308bb799cf0ab6f55fc0461d27a9fa3e4582755a3d81a6af8c09 \
25-
--hash=sha256:ca9f835cdfedcb3f5947304e85b8ca3ace31eef6346d8027a97f4de5fb687534 \
26-
--hash=sha256:cc9253069158d57e27d47a8453d8a2c5a370dc461374111b5184cf2f147a3cc3 \
27-
--hash=sha256:d6edc538c7480fa0a3b2bdd705f8010062d74700198da55d16498e1b49549b9c
10+
aiohttp==3.11.15 \
11+
--hash=sha256:0ec98c22030ea2a430cb11afddda7d4737b7e5c236c704f0d7d15504978598f7 \
12+
--hash=sha256:18733fa6bbe44698ff96138c1f1d682bbdf0846250a42c25c108eed328fef0d4 \
13+
--hash=sha256:2241d862dc6a3c0c2662a6934e79078d3a1e51a76c0dca5d65b30f3debee6c9b \
14+
--hash=sha256:23857adc919b64bba8a4db0eccb24e53fcaf85633e690ef1581c5562ed58cae7 \
15+
--hash=sha256:291f324f49ecede693dfb4820a412d1388cb10a2214ab60028252b505e105d6f \
16+
--hash=sha256:433e7388b3063bba462b3362641988270b087a9ccae22390364f86b37a480c17 \
17+
--hash=sha256:65eb40e74e3126cba185da7a78815cf3a30140932193831b3bfd73c79965c723 \
18+
--hash=sha256:6fd82d0b3f73c59c80dade0ca8e0342de1ee261e147140ade65a465be670e83c \
19+
--hash=sha256:8b4d8d78fbd5290204dcf43957a2184acd5cee358f203f24a3a97f7d7984eeb7 \
20+
--hash=sha256:94c552a4864ed292dadf1d341213374284a3af72e49bea02e70ce6f07cb37004 \
21+
--hash=sha256:a3739daa52c0cff42f1c40f63b2fe818fcf41019d84c80a7add3224207a7060f \
22+
--hash=sha256:a6d6d86443580f846ec9cf60f899b7cace34411f2ff5c95db5970047195e5bfa \
23+
--hash=sha256:b9b9a1e592ac8fcc4584baea240e41f77415e0de98932fdf19565aa3b6a02d0b \
24+
--hash=sha256:c930064b79cc0eb63678e376b819d546b0e2360264cd7544c32119496f646f35 \
25+
--hash=sha256:d99981304065f4ea407dd7495f74f8b8c10f0e26733f8a47dc174ece73744d14 \
26+
--hash=sha256:eba325409a0f990f9b43ed18916cbf5b9779bc4c979b8887c444e7be9c38ccca \
27+
--hash=sha256:f1b6c639750bf2a228957e25fcab7a7ff11987c543d70bf73223369f0d7bdb27
2828
aiolimiter==1.2.1 \
2929
--hash=sha256:d3f249e9059a20badcb56b61601a83556133655c11d1eb3dd3e04ff069e5f3c7 \
3030
--hash=sha256:e02a37ea1a855d9e832252a105420ad4d15011505512a1a1d814647451b5cca9
@@ -78,22 +78,22 @@ attrs==25.3.0 \
7878
base58==2.1.1 \
7979
--hash=sha256:11a36f4d3ce51dfc1043f3218591ac4eb1ceb172919cebe05b52a5bcc8d245c2 \
8080
--hash=sha256:c5d0cb3f5b6e81e8e35da5754388ddcc6d0d14b6c6a132cb93d69ed580a7278c
81-
bitarray==3.2.0 \
82-
--hash=sha256:0d794a6a0c59c70026260ae3c983e05f7b712d0d28da9780f70032031c8741b5 \
83-
--hash=sha256:0e8e5f4073ad83e0086fc7db7da8977f83c488eae05e407869b51739011c392b \
84-
--hash=sha256:15f4793c0ae6d2350059f5d245ed0422dfea1fe5482fbc3dfe6f991fd9c9af01 \
85-
--hash=sha256:2b6b7f1cd876adf5ab029dff9140709f14ad732f965b58dd204e71d22b9b4b7a \
86-
--hash=sha256:333a3bf66eb80d3fe27fa7e4290204076a4b6b5b2e306676543c5955858c92e3 \
87-
--hash=sha256:55684bcf2f258d878cf2371065c3f45c55a42984b9a3ac7932ab9824a5acaa15 \
88-
--hash=sha256:75abbe1cf8b8e1286d0c302afac1d417a4460797a7648e55091ac2fc47e914f6 \
89-
--hash=sha256:79c3b3429a2ae5175452830d6674b3cd96b8b588d59e4d2dbe109d547f10d55d \
90-
--hash=sha256:9225fafa071f167e5be7b62fd433588cbc4909d896ac52be2da221abbe8d047a \
91-
--hash=sha256:98ca5afd7fbd4af2ad9fa7efdb146bc6da81a7cc58fb6b3c44cd46c72af21fa3 \
92-
--hash=sha256:aeba73ba4163b9b1e396c65ec2c51d2437b95d299f325b35a2509dcfafa88a00 \
93-
--hash=sha256:ef0d96550bd97df4d138a2ac5fa159b9d867ba7e04841a2b8ef92d502c6d6ab1 \
94-
--hash=sha256:f19c8c663123d146cd81357cb2a2c6f4528c6439d749056833addd8f81bd06b2 \
95-
--hash=sha256:f3976bfcdb15002b2b7beae1a96b07d97478f5b8d0ab2e4023aabcb4f2dccd04 \
96-
--hash=sha256:f766d1c6a5cbb1f87cb8ce0ff46cefda681cc2f9bef971908f914b2862409922
81+
bitarray==3.3.0 \
82+
--hash=sha256:0437c4e14459bb39dcf2cef2fc32f306a5203c8bb84fcd943744b4a48b33ecc2 \
83+
--hash=sha256:044909ce63b77adf5739de40e2f621473453e9d4bdb913ef2d14c185a4532ce7 \
84+
--hash=sha256:1cbb39bd690956b7b09db0cbb09db304ddab586baab3fa7b71377e0f849558d8 \
85+
--hash=sha256:1f9a76fd0520630730e6ed1f4bfcce9f4d82f36bb7dc738b25a5efa29eaab6f1 \
86+
--hash=sha256:223d4438d69c91157a31670d55c40080787472f9709fe5e1904e2b3b3872c75d \
87+
--hash=sha256:27de33d0d1521f4026ce84e675086f3b7648e88c9f3a94752f844d1406ce0ed2 \
88+
--hash=sha256:57e3edfcd6afa275a7dca89f368f26d3663cd9e1edf3b3897e6d3bd46f6d524c \
89+
--hash=sha256:613183386e665584727c00cf73979845f91b3bcc481846ea528a0319d87a13e1 \
90+
--hash=sha256:8257e28cdab0dc1a1145fc124ae0fd0360cdd7335fb12325b43c44254ceabe8a \
91+
--hash=sha256:91b9ad8f97818f1c29451c7af79dfa4434d7751d105444d75a2fc8374cb7b2bc \
92+
--hash=sha256:9913600777a406ad77846b3c6b46a4b826855d9bb0222935b1bda38caf81b2d6 \
93+
--hash=sha256:a579e8d5764608901e00b1a1643410f8d8a119549e8b63bf5033f73b7159204a \
94+
--hash=sha256:a8fc6e5677d74724f0d3dd8e484b43e2c3ef3be0904d6db7bf82327de09123d5 \
95+
--hash=sha256:ddd23df48a693965a3a7dfd351000d2af36f817a662e6b3690e9f331bf10aaa8 \
96+
--hash=sha256:de5ac4b0f8fd3af5e385b7873e2424c1b35914161f17290bab26ecd3cb32c303
9797
black==25.1.0 \
9898
--hash=sha256:1e2978f6df243b155ef5fa7e558a43037c3079093ed5d10fd84c43900f2d8ecc \
9999
--hash=sha256:33496d5cd1222ad73391352b4ae8da15253c5de89b93a80b3e2c8d9a19ec2666 \
@@ -123,17 +123,17 @@ charset-normalizer==3.4.1 \
123123
--hash=sha256:dad3e487649f498dd991eeb901125411559b22e8d7ab25d3aeb1af367df5efd7 \
124124
--hash=sha256:e358e64305fe12299a08e08978f51fc21fac060dcfcddd95453eabe5b93ed0e1 \
125125
--hash=sha256:ffc9202a29ab3920fa812879e95a9e78b2465fd10be7fcbd042899695d75e616
126-
ckzg==2.1.0 \
127-
--hash=sha256:0959685678e3b89d740412f6d7ae0821b74ccbeac04080cb066774ea3044e2e9 \
128-
--hash=sha256:1bc4c46b0d7db4dd88b55cbd40d13e193536dcd5ae5d0634f0d838de832f429e \
129-
--hash=sha256:516610ac84f414338b0c1dc41a423906503e34b6672450e50cf22a21a707e51f \
130-
--hash=sha256:5a4a3de4f0e264c6d1676379a8968aef681f14df7b1144b7a9ba391180f33510 \
131-
--hash=sha256:73a353f31c945f0617a6b98d82fbb23909ac5039a10e345c681b728dd917b51a \
132-
--hash=sha256:9d9b35cf921a68769dce6fb64c34a7c331e6f7b8055bfbb8661e7163180f2742 \
133-
--hash=sha256:a13ce05bc4d2b93aa4f8aaecf9d785878f3d319a05e499268035a1ab1d464d52 \
134-
--hash=sha256:cecfafea88ef8106440e22eb6db56bf702f30d3af8a3fb54b2a628a5c4e10056 \
135-
--hash=sha256:e28a995e3b2923b05adb023412943dfd3b1aa1ca4e3a93d2149dcfbc15de639f \
136-
--hash=sha256:fb1054189f4c6b83d19e2c1a65521485227eb3b63fa3211adccaa7c587befc2a
126+
ckzg==2.1.1 \
127+
--hash=sha256:025dd31ffdcc799f3ff842570a2a6683b6c5b01567da0109c0c05d11768729c4 \
128+
--hash=sha256:1be3890fc1543f4fcfc0063e4baf5c036eb14bcf736dabdc6171ab017e0f1671 \
129+
--hash=sha256:42af7bde4ca45469cd93a96c3d15d69d51d40e7f0d30e3a20711ebd639465fcb \
130+
--hash=sha256:98e70b5923d77c7359432490145e9d1ab0bf873eb5de56ec53f4a551d7eaec79 \
131+
--hash=sha256:9b42ab8385c273f40a693657c09d2bba40cb4f4666141e263906ba2e519e80bd \
132+
--hash=sha256:a4299149dd72448e5a8d2d1cc6cc7472c92fc9d9f00b1377f5b017c089d9cd92 \
133+
--hash=sha256:b2f8fda87865897a269c4e951e3826c2e814427a6cdfed6731cccfe548f12b36 \
134+
--hash=sha256:b754210ded172968b201e2d7252573af6bf52d6ad127ddd13d0b9a45a51dae7b \
135+
--hash=sha256:c60e8903344ce98ce036f0fabacce952abb714cad4607198b2f0961c28b8aa72 \
136+
--hash=sha256:d6b306b7ec93a24e4346aa53d07f7f75053bc0afc7398e35fa649e5f9d48fcc4
137137
click==8.1.8 \
138138
--hash=sha256:63c132bbbed01578a06712a2d1f497bb62d9c1c0d329b7903a866228027263b2 \
139139
--hash=sha256:ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a
@@ -316,24 +316,24 @@ msgpack==1.1.0 \
316316
--hash=sha256:ad33e8400e4ec17ba782f7b9cf868977d867ed784a1f5f2ab46e7ba53b6e1e1b \
317317
--hash=sha256:d46cf9e3705ea9485687aa4001a76e44748b609d260af21c4ceea7f2212a501d \
318318
--hash=sha256:dd432ccc2c72b914e4cb77afce64aab761c1137cc698be3984eee260bcb2896e
319-
multidict==6.2.0 \
320-
--hash=sha256:0085b0afb2446e57050140240a8595846ed64d1cbd26cef936bfab3192c673b8 \
321-
--hash=sha256:095a2eabe8c43041d3e6c2cb8287a257b5f1801c2d6ebd1dd877424f1e89cf29 \
322-
--hash=sha256:0b183a959fb88ad1be201de2c4bdf52fa8e46e6c185d76201286a97b6f5ee65c \
323-
--hash=sha256:125dd82b40f8c06d08d87b3510beaccb88afac94e9ed4a6f6c71362dc7dbb04b \
324-
--hash=sha256:437c33561edb6eb504b5a30203daf81d4a9b727e167e78b0854d9a4e18e8950b \
325-
--hash=sha256:5d26547423e5e71dcc562c4acdc134b900640a39abd9066d7326a7cc2324c530 \
326-
--hash=sha256:5dd7106d064d05896ce28c97da3f46caa442fe5a43bc26dfb258e90853b39b44 \
327-
--hash=sha256:61d5541f27533f803a941d3a3f8a3d10ed48c12cf918f557efcbf3cd04ef265c \
328-
--hash=sha256:76b34c12b013d813e6cb325e6bd4f9c984db27758b16085926bbe7ceeaace626 \
329-
--hash=sha256:7c611345bbe7cb44aabb877cb94b63e86f2d0db03e382667dbd037866d44b4f8 \
330-
--hash=sha256:89b3857652183b8206a891168af47bac10b970d275bba1f6ee46565a758c078d \
331-
--hash=sha256:8cd1a0644ccaf27e9d2f6d9c9474faabee21f0578fe85225cc5af9a61e1653df \
332-
--hash=sha256:9f49585f4abadd2283034fc605961f40c638635bc60f5162276fec075f2e37a4 \
333-
--hash=sha256:a0cc398350ef31167e03f3ca7c19313d4e40a662adcb98a88755e4e861170bdd \
334-
--hash=sha256:ac380cacdd3b183338ba63a144a34e9044520a6fb30c58aa14077157a033c13e \
335-
--hash=sha256:e25b11a0417475f093d0f0809a149aff3943c2c56da50fdf2c3c88d57fe3dfbd \
336-
--hash=sha256:facaf11f21f3a4c51b62931feb13310e6fe3475f85e20d9c9fdce0d2ea561b87
319+
multidict==6.3.1 \
320+
--hash=sha256:123b1d48eeed2ac1126be078deb88006f871559787cefc8759a884442a6f2cdc \
321+
--hash=sha256:1ce924e24c4f1c014f2ed8782e82a5232d5f61293fc5c204d8569f451191ffa8 \
322+
--hash=sha256:284737db826cc00fbd5292225717492f037afa404a2ddfea812cfbef7a3f0e93 \
323+
--hash=sha256:2d45b070b33fa1d0a9a7650469997713e3a4f5cd9eb564332d5d0206cf61efc5 \
324+
--hash=sha256:31f94d64672487570c7c2bbcff74311055066e013545714b938786843eb54ef8 \
325+
--hash=sha256:3e18d6afe3f855736022748606def2000af18e90253fb8b4d698b51f61e21283 \
326+
--hash=sha256:5072a9efe7f7f79d3dff1f26ac41e4893478f85ce55fe5318625f7eb703d76f8 \
327+
--hash=sha256:6d98447906885e7f0f90456cde1d14ff41f30d9d7e127ab7140a45e784a0ff1b \
328+
--hash=sha256:739fe3fde8b8aca7219048f8bda17901afb8710c93307dc0d740014d3481b36b \
329+
--hash=sha256:73a43b3b2409aa395cce91b7471cff6b45814548063b18412162ba2222084201 \
330+
--hash=sha256:891a94a056de2d904cc30f40ec1d111aebb09abd33089a34631ff5a19e0167b2 \
331+
--hash=sha256:9679106633695b132ebc9191ec6230bfb1415d37c483833fcef2b35a2e8665ec \
332+
--hash=sha256:baec41c191855f92507f9e0bb182eea7eea5992d649f9c712c96a38076e59d00 \
333+
--hash=sha256:bbc825b34595fe43966242e30b54d29617013e51b4310134aa2c16c3b3d00c91 \
334+
--hash=sha256:d9844e0f93405a9c5bc2106d48cf82e022e18685baebea74cc5057ca2009799e \
335+
--hash=sha256:eacd4036bb3d632828702a076458d660b53d12e049155eaeb7d11a91242d67b8 \
336+
--hash=sha256:ebd121433f5d8707379f4fc0e6b4bf67b0b7cd1a7132e097ead2713c8d661a41
337337
mypy-extensions==1.0.0 \
338338
--hash=sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d \
339339
--hash=sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782
@@ -514,12 +514,31 @@ ruamel-yaml-clib==0.2.12 ; platform_python_implementation == 'CPython' \
514514
--hash=sha256:b82a7c94a498853aa0b272fd5bc67f29008da798d4f93a2f9f289feb8426a58d \
515515
--hash=sha256:bf165fef1f223beae7333275156ab2022cffe255dcc51c27f066b4370da81e31 \
516516
--hash=sha256:e8c4ebfcfd57177b572e2040777b8abc537cdef58a2120e830124946aa9b42c5
517+
ruff==0.11.2 \
518+
--hash=sha256:0397c2672db015be5aa3d4dac54c69aa012429097ff219392c018e21f5085147 \
519+
--hash=sha256:0c543bf65d5d27240321604cee0633a70c6c25c9a2f2492efa9f6d4b8e4199bb \
520+
--hash=sha256:20967168cc21195db5830b9224be0e964cc9c8ecf3b5a9e3ce19876e8d3a96e3 \
521+
--hash=sha256:2a2b50ca35457ba785cd8c93ebbe529467594087b527a08d487cf0ee7b3087e9 \
522+
--hash=sha256:2c5424cc1c4eb1d8ecabe6d4f1b70470b4f24a0c0171356290b1953ad8f0e272 \
523+
--hash=sha256:3170150172a8f994136c0c66f494edf199a0bbea7a409f649e4bc8f4d7084080 \
524+
--hash=sha256:52933095158ff328f4c77af3d74f0379e34fd52f175144cefc1b192e7ccd32b4 \
525+
--hash=sha256:6e8fb75e14560f7cf53b15bbc55baf5ecbe373dd5f3aab96ff7aa7777edd7630 \
526+
--hash=sha256:7c69c74bf53ddcfbc22e6eb2f31211df7f65054bfc1f72288fc71e5f82db3eab \
527+
--hash=sha256:842a472d7b4d6f5924e9297aa38149e5dcb1e628773b70e6387ae2c97a63c58f \
528+
--hash=sha256:869bcf3f9abf6457fbe39b5a37333aa4eecc52a3b99c98827ccc371a8e5b6f1b \
529+
--hash=sha256:86b3a27c38b8fce73bcd262b0de32e9a6801b76d52cdb3ae4c914515f0cef608 \
530+
--hash=sha256:955a9ce63483999d9f0b8f0b4a3ad669e53484232853054cc8b9d51ab4c5de74 \
531+
--hash=sha256:a3b66a03b248c9fcd9d64d445bafdf1589326bee6fc5c8e92d7562e58883e30f \
532+
--hash=sha256:aca01ccd0eb5eb7156b324cfaa088586f06a86d9e5314b0eb330cb48415097cc \
533+
--hash=sha256:c69e20ea49e973f3afec2c06376eb56045709f0212615c1adb0eda35e8a4e477 \
534+
--hash=sha256:ec47591497d5a1050175bdf4e1a4e6272cddff7da88a2ad595e1e326041d8d94 \
535+
--hash=sha256:ecf20854cc73f42171eedb66f006a43d0a21bfb98a2523a809931cda569552d9
517536
scalecodec==1.2.11 \
518537
--hash=sha256:99a2cdbfccdcaf22bd86b86da55a730a2855514ad2309faef4a4a93ac6cbeb8d \
519538
--hash=sha256:d15c94965f617caa25096f83a45f5f73031d05e6ee08d6039969f0a64fc35de1
520-
sentry-sdk==2.24.1 \
521-
--hash=sha256:36baa6a1128b9d98d2adc5e9b2f887eff0a6af558fc2b96ed51919042413556d \
522-
--hash=sha256:8ba3c29990fa48865b908b3b9dc5ae7fa7e72407c7c9e91303e5206b32d7b8b1
539+
sentry-sdk==2.25.0 \
540+
--hash=sha256:a6e623691ff03d1758f940fe421e5b65f313f4ac37638079ab94d1b6f052eb15 \
541+
--hash=sha256:aa0f558209c1819391421d65e25b1c4000f49580e6ecf5c05ff0c6e74f74470b
523542
six==1.17.0 \
524543
--hash=sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274 \
525544
--hash=sha256:ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81

src/demo_substrate_events/abi/assethub/v601.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2474,7 +2474,8 @@
24742474
"Twox64Concat"
24752475
],
24762476
"key_vec": [
2477-
"Tuple:[U8; 4]Vec<U8>"
2477+
"[U8; 4]",
2478+
"Vec<U8>"
24782479
],
24792480
"value": "AccountId",
24802481
"keys_id": 178,

src/dipdup/cli.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,7 @@ async def run(ctx: click.Context) -> None:
348348
@cli.command()
349349
@click.option('--force', '-f', is_flag=True, help='Overwrite existing types and ABIs.')
350350
@click.option('--base', '-b', is_flag=True, help='Include template base: pyproject.toml, Dockerfile, etc.')
351+
@click.option('--no-linter', is_flag=True, help='Skip linter and formatter.')
351352
@click.argument(
352353
'include',
353354
type=str,
@@ -360,6 +361,7 @@ async def init(
360361
ctx: click.Context,
361362
force: bool,
362363
base: bool,
364+
no_linter: bool,
363365
include: list[str],
364366
) -> None:
365367
"""Generate project tree, typeclasses and callback stubs.
@@ -374,6 +376,7 @@ async def init(
374376
await dipdup.init(
375377
force=force,
376378
base=base or bool(include),
379+
no_linter=no_linter,
377380
include=set(include),
378381
)
379382

@@ -415,6 +418,7 @@ async def migrate(ctx: click.Context, dry_run: bool) -> None:
415418
ctx=ctx,
416419
base=True,
417420
force=True,
421+
no_linter=True,
418422
include=[],
419423
)
420424

@@ -982,6 +986,7 @@ async def new(
982986
ctx=ctx,
983987
base=False,
984988
force=force,
989+
no_linter=False,
985990
include=[],
986991
)
987992

src/dipdup/codegen/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
from pydantic import BaseModel
1313
from pydantic.dataclasses import dataclass
1414

15+
from dipdup import env
1516
from dipdup.config import SYSTEM_HOOKS
1617
from dipdup.config import DipDupConfig
1718
from dipdup.config import HandlerConfig
@@ -84,6 +85,7 @@ async def init(
8485
self,
8586
force: bool = False,
8687
base: bool = False,
88+
no_linter: bool = False,
8789
) -> None:
8890
# NOTE: Package structure
8991
self._package.initialize()
@@ -114,6 +116,9 @@ async def init(
114116
await self.generate_handlers()
115117
await self.generate_batch_handler()
116118

119+
if not env.NO_LINTER and not no_linter:
120+
self._package.format_lint()
121+
117122
async def generate_hooks(self) -> None:
118123
for hook_config in self._config.hooks.values():
119124
await self._generate_callback(hook_config, 'hooks', sql=True)

src/dipdup/dipdup.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -658,6 +658,7 @@ async def init(
658658
self,
659659
force: bool = False,
660660
base: bool = False,
661+
no_linter: bool = False,
661662
include: set[str] | None = None,
662663
) -> None:
663664
"""Create new or update existing dipdup project"""
@@ -692,6 +693,7 @@ async def init(
692693
await codegen.init(
693694
force=force,
694695
base=base,
696+
no_linter=no_linter,
695697
)
696698

697699
await generate_environments(self._config, package)

0 commit comments

Comments
 (0)