From 0faa384c35984326b2ebe9f40f70ee60c246b65c Mon Sep 17 00:00:00 2001 From: Sasha Lopoukhine Date: Wed, 4 Dec 2024 10:11:08 +0000 Subject: [PATCH 01/10] documentation: add experimental features flag guide to README --- README.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0ad34d9eb9..3ff3df6905 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ optimization capabilities. - [xDSL Developer Setup](#xdsl-developer-setup) - [Developer Installation](#developer-installation) - [Testing](#testing) - - [Formatting](#formatting) + - [Formatting](#formatting-and-typechecking) ## Installation @@ -135,6 +135,17 @@ Furthermore, all python code must run through [pyright](https://github.com/micro without errors. Pyright can be run on all staged files through the makefile using `make pyright`. +> [!warning] Experimental Pyright Features +> +> xDSL currently relies on an experimental feature of Pyright called TypeForm +> TypeForm is [in discussion](https://discuss.python.org/t/pep-747-typeexpr-type-hint-for-a-type-expression/55984) and will likely land in some future version of Python. +> For xDSL to type check correctly using Pyright, please add this to your `pyproject.toml`: +> +> ``` text +> [tool.pyright] +> enableExperimentalFeatures = true +> ``` + ### Discussion You can also join the discussion at our [Zulip chat room](https://xdsl.zulipchat.com), kindly supported by community hosting from [Zulip](https://zulip.com/). From d195277493cb48b1f6da35fc7761861a17f0398b Mon Sep 17 00:00:00 2001 From: Sasha Lopoukhine Date: Wed, 4 Dec 2024 10:12:22 +0000 Subject: [PATCH 02/10] WARNING --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3ff3df6905..03442436fe 100644 --- a/README.md +++ b/README.md @@ -135,7 +135,7 @@ Furthermore, all python code must run through [pyright](https://github.com/micro without errors. Pyright can be run on all staged files through the makefile using `make pyright`. -> [!warning] Experimental Pyright Features +> [!WARNING] Experimental Pyright Features > > xDSL currently relies on an experimental feature of Pyright called TypeForm > TypeForm is [in discussion](https://discuss.python.org/t/pep-747-typeexpr-type-hint-for-a-type-expression/55984) and will likely land in some future version of Python. From 33a81e0cc51e4c083dc9e9891de5824881a5e3fb Mon Sep 17 00:00:00 2001 From: Sasha Lopoukhine Date: Wed, 4 Dec 2024 10:14:19 +0000 Subject: [PATCH 03/10] shorten warning --- README.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 03442436fe..6e7ff5ac64 100644 --- a/README.md +++ b/README.md @@ -139,12 +139,13 @@ makefile using `make pyright`. > > xDSL currently relies on an experimental feature of Pyright called TypeForm > TypeForm is [in discussion](https://discuss.python.org/t/pep-747-typeexpr-type-hint-for-a-type-expression/55984) and will likely land in some future version of Python. -> For xDSL to type check correctly using Pyright, please add this to your `pyproject.toml`: -> -> ``` text -> [tool.pyright] -> enableExperimentalFeatures = true -> ``` + +For xDSL to type check correctly using Pyright, please add this to your `pyproject.toml`: + +``` text +[tool.pyright] +enableExperimentalFeatures = true +``` ### Discussion From 79eb9420e8307c20e3cf7b3d0894e24eabfb1bb9 Mon Sep 17 00:00:00 2001 From: Sasha Lopoukhine Date: Wed, 4 Dec 2024 10:14:49 +0000 Subject: [PATCH 04/10] Formatting and Typechecking --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6e7ff5ac64..978da10c5e 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ optimization capabilities. - [xDSL Developer Setup](#xdsl-developer-setup) - [Developer Installation](#developer-installation) - [Testing](#testing) - - [Formatting](#formatting-and-typechecking) + - [Formatting and Typechecking](#formatting-and-typechecking) ## Installation From 547696575a37ad4561eb46397c0cc0df2d72de0a Mon Sep 17 00:00:00 2001 From: Sasha Lopoukhine Date: Wed, 4 Dec 2024 10:15:40 +0000 Subject: [PATCH 05/10] warning test --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 978da10c5e..bc7ee0d1cd 100644 --- a/README.md +++ b/README.md @@ -140,6 +140,9 @@ makefile using `make pyright`. > xDSL currently relies on an experimental feature of Pyright called TypeForm > TypeForm is [in discussion](https://discuss.python.org/t/pep-747-typeexpr-type-hint-for-a-type-expression/55984) and will likely land in some future version of Python. +> [!IMPORTANT] +> Test + For xDSL to type check correctly using Pyright, please add this to your `pyproject.toml`: ``` text From 62d2e6f76ea60df8bb650d8e19d940bcc4a72da5 Mon Sep 17 00:00:00 2001 From: Sasha Lopoukhine Date: Wed, 4 Dec 2024 10:16:23 +0000 Subject: [PATCH 06/10] try without heading --- README.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index bc7ee0d1cd..8e353a0f73 100644 --- a/README.md +++ b/README.md @@ -135,14 +135,12 @@ Furthermore, all python code must run through [pyright](https://github.com/micro without errors. Pyright can be run on all staged files through the makefile using `make pyright`. -> [!WARNING] Experimental Pyright Features +> [!IMPORTANT] > +> *Experimental Pyright Features* > xDSL currently relies on an experimental feature of Pyright called TypeForm > TypeForm is [in discussion](https://discuss.python.org/t/pep-747-typeexpr-type-hint-for-a-type-expression/55984) and will likely land in some future version of Python. -> [!IMPORTANT] -> Test - For xDSL to type check correctly using Pyright, please add this to your `pyproject.toml`: ``` text From 2b8fe6a1e5780333d2f8364e9178df0a8aad93e3 Mon Sep 17 00:00:00 2001 From: Sasha Lopoukhine Date: Wed, 4 Dec 2024 10:17:03 +0000 Subject: [PATCH 07/10] add instructions back to tooltip --- README.md | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 8e353a0f73..b015a6a174 100644 --- a/README.md +++ b/README.md @@ -137,16 +137,17 @@ makefile using `make pyright`. > [!IMPORTANT] > -> *Experimental Pyright Features* +> ## Experimental Pyright Features +> > xDSL currently relies on an experimental feature of Pyright called TypeForm > TypeForm is [in discussion](https://discuss.python.org/t/pep-747-typeexpr-type-hint-for-a-type-expression/55984) and will likely land in some future version of Python. - -For xDSL to type check correctly using Pyright, please add this to your `pyproject.toml`: - -``` text -[tool.pyright] -enableExperimentalFeatures = true -``` +> +> For xDSL to type check correctly using Pyright, please add this to your `pyproject.toml`: +> +> ``` text +> [tool.pyright] +> enableExperimentalFeatures = true +> ``` ### Discussion From 57aea9e77ad7d6320fcefed9ca416ab869e11806 Mon Sep 17 00:00:00 2001 From: Sasha Lopoukhine Date: Wed, 4 Dec 2024 10:19:12 +0000 Subject: [PATCH 08/10] H4 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b015a6a174..a41300e062 100644 --- a/README.md +++ b/README.md @@ -137,7 +137,7 @@ makefile using `make pyright`. > [!IMPORTANT] > -> ## Experimental Pyright Features +> #### Experimental Pyright Features > > xDSL currently relies on an experimental feature of Pyright called TypeForm > TypeForm is [in discussion](https://discuss.python.org/t/pep-747-typeexpr-type-hint-for-a-type-expression/55984) and will likely land in some future version of Python. From 4504b41831df95aeda3310a33fee99a6c002396e Mon Sep 17 00:00:00 2001 From: Sasha Lopoukhine Date: Wed, 4 Dec 2024 10:20:59 +0000 Subject: [PATCH 09/10] yaml syntax --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a41300e062..9045577fd8 100644 --- a/README.md +++ b/README.md @@ -144,7 +144,7 @@ makefile using `make pyright`. > > For xDSL to type check correctly using Pyright, please add this to your `pyproject.toml`: > -> ``` text +> ```yaml > [tool.pyright] > enableExperimentalFeatures = true > ``` From 1c88997ae46885dd5d356f27ba351e19fcd58742 Mon Sep 17 00:00:00 2001 From: Sasha Lopoukhine Date: Wed, 4 Dec 2024 10:50:46 +0000 Subject: [PATCH 10/10] toml not yaml --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9045577fd8..e4cb968dec 100644 --- a/README.md +++ b/README.md @@ -144,7 +144,7 @@ makefile using `make pyright`. > > For xDSL to type check correctly using Pyright, please add this to your `pyproject.toml`: > -> ```yaml +> ```toml > [tool.pyright] > enableExperimentalFeatures = true > ```