Skip to content

Commit

Permalink
chore: Self & _compat (#479)
Browse files Browse the repository at this point in the history
* chore: use Self

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>

* chore: move sys.version_info things to _compat

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>

* chore: ignore redefined-builtin

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>

---------

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
henryiii authored Feb 28, 2023
1 parent 1126536 commit cdfc4c3
Showing 25 changed files with 220 additions and 227 deletions.
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@ repos:
rev: v0.0.253
hooks:
- id: ruff
args: ["--fix"]
args: ["--fix", "--show-fixes"]

- repo: https://github.com/asottile/setup-cfg-fmt
rev: v2.2.0
@@ -37,9 +37,9 @@ repos:
- repo: https://github.com/nbQA-dev/nbQA
rev: 1.6.3
hooks:
- id: nbqa-pyupgrade
additional_dependencies: [pyupgrade==3.3.1]
args: ["--py37-plus"]
- id: nbqa-ruff
additional_dependencies: [ruff==0.0.253]
args: ["--extend-ignore=B008,T20,I002,E402", "--fix", "--show-fixes"]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.0.1
5 changes: 3 additions & 2 deletions docs/examples/HistDemo.ipynb
Original file line number Diff line number Diff line change
@@ -36,8 +36,9 @@
"metadata": {},
"outputs": [],
"source": [
"from hist import Hist\n",
"import numpy as np"
"import numpy as np\n",
"\n",
"from hist import Hist"
]
},
{
9 changes: 5 additions & 4 deletions docs/user-guide/notebooks/Histogram.ipynb
Original file line number Diff line number Diff line change
@@ -42,8 +42,8 @@
"metadata": {},
"outputs": [],
"source": [
"from hist import Hist\n",
"import hist"
"import hist\n",
"from hist import Hist"
]
},
{
@@ -510,8 +510,9 @@
"metadata": {},
"outputs": [],
"source": [
"import hist.dask as dah\n",
"import dask.array as da"
"import dask.array as da\n",
"\n",
"import hist.dask as dah"
]
},
{
7 changes: 4 additions & 3 deletions docs/user-guide/notebooks/Interpolation.ipynb
Original file line number Diff line number Diff line change
@@ -20,10 +20,11 @@
"outputs": [],
"source": [
"# Make the necessary imports.\n",
"from scipy import interpolate\n",
"from hist import Hist, axis\n",
"import matplotlib.pyplot as plt\n",
"import numpy as np"
"import numpy as np\n",
"from scipy import interpolate\n",
"\n",
"from hist import Hist"
]
},
{
4 changes: 2 additions & 2 deletions docs/user-guide/notebooks/Plots.ipynb
Original file line number Diff line number Diff line change
@@ -20,8 +20,8 @@
"metadata": {},
"outputs": [],
"source": [
"from hist import Hist\n",
"import hist"
"import hist\n",
"from hist import Hist"
]
},
{
5 changes: 3 additions & 2 deletions docs/user-guide/notebooks/Reprs.ipynb
Original file line number Diff line number Diff line change
@@ -15,8 +15,9 @@
"metadata": {},
"outputs": [],
"source": [
"from hist import Hist\n",
"import numpy as np"
"import numpy as np\n",
"\n",
"from hist import Hist"
]
},
{
Loading

0 comments on commit cdfc4c3

Please sign in to comment.