Skip to content

Commit f956856

Browse files
authored
Merge branch 'dev' into satwikkansal#350/add-nox-support
2 parents f251561 + 15429d0 commit f956856

File tree

12 files changed

+498
-2812
lines changed

12 files changed

+498
-2812
lines changed

.github/workflows/pr.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
on: [pull_request]
2+
3+
permissions:
4+
contents: read
5+
pull-requests: read
6+
checks: write
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
lint:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: DavidAnson/markdownlint-cli2-action@v17

.gitignore

-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22

33
node_modules
44
npm-debug.log
5-
wtfpython-pypi/build/
6-
wtfpython-pypi/dist/
7-
wtfpython-pypi/wtfpython.egg-info
85

96
# Python-specific byte-compiled files should be ignored
107
__pycache__/

.markdownlint.yaml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# MD013/line-length
2+
MD013:
3+
line_length: 120
4+
5+
# no-duplicate-heading - Multiple headings with the same content (Ignore multiple `Explanation` headings)
6+
MD024: false
7+
8+
# no-trailing-punctuation - Trailing punctuation in heading (Ignore exclamation marks in headings)
9+
MD026: false
10+
11+
# no-inline-html : Inline HTML (HTML is used for centered and theme specific images)
12+
MD033: false
13+
14+
# no-inline-html : Bare URL used (site should be attributed transparently, because otherwise we have to un-necesarily explain where the link directs)
15+
MD034: false

.pre-commit-config.yaml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
default_language_version:
2+
python: python3.12
3+
repos:
4+
- repo: https://github.com/DavidAnson/markdownlint-cli2
5+
rev: v0.14.0
6+
hooks:
7+
- id: markdownlint-cli2

README.md

+457-314
Large diffs are not rendered by default.

irrelevant/wtf.ipynb

+1-10
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"\n",
1111
"Translations: [Chinese \u4e2d\u6587](https://github.com/leisurelicht/wtfpython-cn) | [Vietnamese Ti\u1ebfng Vi\u1ec7t](https://github.com/vuduclyunitn/wtfptyhon-vi) | [Add translation](https://github.com/satwikkansal/wtfpython/issues/new?title=Add%20translation%20for%20[LANGUAGE]&body=Expected%20time%20to%20finish:%20[X]%20weeks.%20I%27ll%20start%20working%20on%20it%20from%20[Y].)\n",
1212
"\n",
13-
"Other modes: [Interactive](https://colab.research.google.com/github/satwikkansal/wtfpython/blob/master/irrelevant/wtf.ipynb) | [CLI](https://pypi.python.org/pypi/wtfpython)\n",
13+
"Other modes: [Interactive](https://colab.research.google.com/github/satwikkansal/wtfpython/blob/master/irrelevant/wtf.ipynb)\n",
1414
"\n",
1515
"Python, being a beautifully designed high-level and interpreter-based programming language, provides us with many features for the programmer's comfort. But sometimes, the outcomes of a Python snippet may not seem obvious at first sight.\n",
1616
"\n",
@@ -71,15 +71,6 @@
7171
" - If the answer is no (which is perfectly okay), take a deep breath, and read the explanation (and if you still don't understand, shout out! and create an issue [here](https://github.com/satwikkansal/wtfpython/issues/new)).\n",
7272
" - If yes, give a gentle pat on your back, and you may skip to the next example.\n",
7373
"\n",
74-
"PS: You can also read WTFPython at the command line using the [pypi package](https://pypi.python.org/pypi/wtfpython),\n",
75-
"```sh\n",
76-
"$ pip install wtfpython -U\n",
77-
"$ wtfpython\n",
78-
"```\n",
79-
"---\n",
80-
"\n",
81-
"# \ud83d\udc40 Examples\n",
82-
"\n",
8374
"\n\n## Hosted notebook instructions\n\nThis is just an experimental attempt of browsing wtfpython through jupyter notebooks. Some examples are read-only because, \n- they either require a version of Python that's not supported in the hosted runtime.\n- or they can't be reproduced in the notebook envrinonment.\n\nThe expected outputs are already present in collapsed cells following the code cells. The Google colab provides Python2 (2.7) and Python3 (3.6, default) runtimes. You can switch among these for Python2 specific examples. For examples specific to other minor versions, you can simply refer to collapsed outputs (it's not possible to control the minor version in hosted notebooks as of now). You can check the active version using\n\n```py\n>>> import sys\n>>> sys.version\n# Prints out Python version here.\n```\n\nThat being said, most of the examples do work as expected. If you face any trouble, feel free to consult the original content on wtfpython and create an issue in the repo. Have fun!\n\n---\n"
8475
]
8576
},

translations/ru-russian/README.md

+1-8
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
Переводы: [English Original](https://github.com/satwikkansal/wtfpython) [Chinese 中文](https://github.com/robertparley/wtfpython-cn) | [Vietnamese Tiếng Việt](https://github.com/vuduclyunitn/wtfptyhon-vi) | [Spanish Español](https://web.archive.org/web/20220511161045/https://github.com/JoseDeFreitas/wtfpython-es) | [Korean 한국어](https://github.com/buttercrab/wtfpython-ko) | [Russian Русский](https://github.com/satwikkansal/wtfpython/tree/master/translations/ru-russian) | [German Deutsch](https://github.com/BenSt099/wtfpython) | [Add translation](https://github.com/satwikkansal/wtfpython/issues/new?title=Add%20translation%20for%20[LANGUAGE]&body=Expected%20time%20to%20finish:%20[X]%20weeks.%20I%27ll%20start%20working%20on%20it%20from%20[Y].)
1212

13-
Альтернативные способы: [Интерактивный сайт](https://wtfpython-interactive.vercel.app) | [Интерактивный Jupiter notebook](https://colab.research.google.com/github/satwikkansal/wtfpython/blob/master/irrelevant/wtf.ipynb) | [CLI](https://pypi.python.org/pypi/wtfpython)
13+
Альтернативные способы: [Интерактивный сайт](https://wtfpython-interactive.vercel.app) | [Интерактивный Jupiter notebook](https://colab.research.google.com/github/satwikkansal/wtfpython/blob/master/irrelevant/wtf.ipynb)
1414

1515
Python, будучи прекрасно спроектированным высокоуровневым языком программирования, предоставляет множество возможностей для удобства программиста. Но иногда поведение Python кода могут показаться запутывающим на первый взгляд.
1616

@@ -215,13 +215,6 @@ PS: Если вы уже читали **wtfpython** раньше, с измен
215215
- Если ответ отрицательный (что совершенно нормально), сделать глубокий вдох и прочитать объяснение (а если пример все еще непонятен, и создайте [issue](https://github.com/satwikkansal/wtfpython/issues/new)).
216216
- Если "да", ощутите мощь своих познаний в Python и переходите к следующему примеру.
217217
218-
PS: Вы также можете читать WTFPython в командной строке, используя [pypi package](https://pypi.python.org/pypi/wtfpython),
219-
220-
```sh
221-
pip install wtfpython -U
222-
wtfpython
223-
```
224-
225218
# 👀 Примеры
226219
227220
## Раздел: Напряги мозги!

0 commit comments

Comments
 (0)