Skip to content

Commit 6929b2d

Browse files
committed
Invert docs gitignore
1 parent a74523f commit 6929b2d

File tree

7 files changed

+155
-9
lines changed

7 files changed

+155
-9
lines changed

docs/.gitignore

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
*
2-
!assets
3-
!configuration.md
4-
!editor-integrations.md
5-
!faq.md
6-
!installation.md
7-
!requirements.txt
8-
!tutorial.md
9-
!usage.md
1+
contributing.md
2+
index.md
3+
rules.md
4+
rules/
5+
settings.md
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<script src="https://cdn.usefathom.com/script.js" data-site="DUAEBFLB" defer></script>

docs/assets/bolt.svg

Lines changed: 3 additions & 0 deletions
Loading

docs/assets/ruff-favicon.png

751 Bytes
Loading

docs/preview.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Preview
2+
3+
Ruff includes an opt-in preview mode to provide an opportunity for community feedback and increase confidence that
4+
changes are a net-benefit before enabling them for everyone.
5+
6+
Preview mode enables a collection of newer rules and fixes that are considered experimental or unstable.
7+
8+
## Enabling preview mode
9+
10+
Preview mode can be enabled with the `--preview` flag on the CLI or by setting `preview = true` in your Ruff
11+
configuration file (e.g. `pyproject.toml`).
12+
13+
## Using rules that are in preview
14+
15+
If a rule is marked as preview, it can only be selected if preview mode is enabled. For example, consider a
16+
hypothetical rule, `HYP001`. If `HYP001` were in preview, it would _not_ be enabled by adding following to your
17+
`pyproject.toml`:
18+
19+
```toml
20+
[tool.ruff]
21+
extend-select = ["HYP001"]
22+
```
23+
24+
It also would _not_ be enabled by selecting the `HYP` category, like so:
25+
26+
```toml
27+
[tool.ruff]
28+
extend-select = ["HYP"]
29+
```
30+
31+
Similarly, it would _not_ be enabled via the `ALL` selector:
32+
33+
```toml
34+
[tool.ruff]
35+
select = ["ALL"]
36+
```
37+
38+
However, it would be enabled in any of the above cases if you you enabled preview in your configuration file:
39+
40+
```toml
41+
[tool.ruff]
42+
extend-select = ["HYP"]
43+
preview = true
44+
```
45+
46+
Or, if you provided the `--preview` CLI flag.
47+
48+
To see which rules are currently in preview, visit the [rules reference](rules.md).

docs/requirements-insiders.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
PyYAML==6.0
2+
black==23.3.0
3+
mkdocs==1.5.0
4+
git+ssh://[email protected]/astral-sh/mkdocs-material-insiders.git@38c0b8187325c3bab386b666daf3518ac036f2f4

docs/stylesheets/extra.css

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
:root {
2+
--black: #261230;
3+
--white: #ffffff;
4+
--radiate: #d7ff64;
5+
--flare: #6340ac;
6+
--rock: #78876e;
7+
--galaxy: #261230;
8+
--space: #30173d;
9+
--comet: #6f5d6f;
10+
--cosmic: #de5fe9;
11+
--sun: #ffac2f;
12+
--electron: #46ebe1;
13+
--aurora: #46eb74;
14+
--constellation: #5f6de9;
15+
--neutron: #cff3cf;
16+
--proton: #f6afbc;
17+
--nebula: #cdcbfb;
18+
--supernova: #f1aff6;
19+
--starlight: #f4f4f1;
20+
--lunar: #fbf2fc;
21+
--asteroid: #e3cee3;
22+
--crater: #f0dfdf;
23+
}
24+
25+
[data-md-color-scheme="astral-light"] {
26+
--md-default-bg-color--dark: var(--black);
27+
--md-primary-fg-color: var(--galaxy);
28+
--md-typeset-a-color: var(--flare);
29+
--md-accent-fg-color: var(--cosmic);
30+
}
31+
32+
[data-md-color-scheme="astral-dark"] {
33+
--md-default-bg-color: var(--galaxy);
34+
--md-default-fg-color: var(--white);
35+
--md-default-fg-color--light: var(--white);
36+
--md-default-fg-color--lighter: var(--white);
37+
--md-primary-fg-color: var(--space);
38+
--md-primary-bg-color: var(--white);
39+
--md-accent-fg-color: var(--radiate);
40+
41+
--md-typeset-color: var(--white);
42+
--md-typeset-a-color: var(--radiate);
43+
--md-typeset-mark-color: var(--sun);
44+
45+
--md-code-fg-color: var(--white);
46+
--md-code-bg-color: var(--space);
47+
48+
--md-code-hl-comment-color: var(--asteroid);
49+
--md-code-hl-punctuation-color: var(--asteroid);
50+
--md-code-hl-generic-color: var(--supernova);
51+
--md-code-hl-variable-color: var(--starlight);
52+
--md-code-hl-string-color: var(--radiate);
53+
--md-code-hl-keyword-color: var(--supernova);
54+
--md-code-hl-operator-color: var(--supernova);
55+
--md-code-hl-number-color: var(--electron);
56+
--md-code-hl-special-color: var(--electron);
57+
--md-code-hl-function-color: var(--neutron);
58+
--md-code-hl-constant-color: var(--radiate);
59+
--md-code-hl-name-color: var(--md-code-fg-color);
60+
61+
--md-typeset-del-color: hsla(6, 90%, 60%, 0.15);
62+
--md-typeset-ins-color: hsla(150, 90%, 44%, 0.15);
63+
64+
--md-typeset-table-color: hsla(0, 0%, 100%, 0.12);
65+
--md-typeset-table-color--light: hsla(0, 0%, 100%, 0.035);
66+
}
67+
68+
[data-md-color-scheme="astral-light"] img[src$="#only-dark"],
69+
[data-md-color-scheme="astral-light"] img[src$="#gh-dark-mode-only"] {
70+
display: none; /* Hide dark images in light mode */
71+
}
72+
73+
[data-md-color-scheme="astral-light"] img[src$="#only-light"],
74+
[data-md-color-scheme="astral-light"] img[src$="#gh-light-mode-only"] {
75+
display: inline; /* Show light images in light mode */
76+
}
77+
78+
[data-md-color-scheme="astral-dark"] img[src$="#only-light"],
79+
[data-md-color-scheme="astral-dark"] img[src$="#gh-light-mode-only"] {
80+
display: none; /* Hide light images in dark mode */
81+
}
82+
83+
[data-md-color-scheme="astral-dark"] img[src$="#only-dark"],
84+
[data-md-color-scheme="astral-dark"] img[src$="#gh-dark-mode-only"] {
85+
display: inline; /* Show dark images in dark mode */
86+
}
87+
88+
/* See: https://github.com/squidfunk/mkdocs-material/issues/175#issuecomment-616694465 */
89+
.md-typeset__table {
90+
min-width: 100%;
91+
}
92+
.md-typeset table:not([class]) {
93+
display: table;
94+
}

0 commit comments

Comments
 (0)