Skip to content

Commit

Permalink
chore: [pre-commit.ci] pre-commit autoupdate (#2108)
Browse files Browse the repository at this point in the history
* Update pre-commit hooks:
   - github.com/psf/black: 22.12.0 → 23.1.0
   - github.com/asottile/blacken-docs: v1.12.1 → 1.13.0
   - github.com/nbQA-dev/nbQA: 1.6.0 → 1.6.1
  • Loading branch information
pre-commit-ci[bot] authored Feb 7, 2023
1 parent 4408538 commit 2b168b7
Show file tree
Hide file tree
Showing 9 changed files with 4 additions and 15 deletions.
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ repos:
- id: absolufy-imports

- repo: https://github.com/psf/black
rev: 22.12.0
rev: 23.1.0
hooks:
- id: black-jupyter

- repo: https://github.com/asottile/blacken-docs
rev: v1.12.1
rev: 1.13.0
hooks:
- id: blacken-docs
additional_dependencies: [black==22.12.0]
additional_dependencies: [black==23.1.0]

- repo: https://github.com/asottile/yesqa
rev: v1.4.0
Expand Down Expand Up @@ -76,7 +76,7 @@ repos:
args: ["--python-version=3.10"]

- repo: https://github.com/nbQA-dev/nbQA
rev: 1.6.0
rev: 1.6.1
hooks:
- id: nbqa-pyupgrade
additional_dependencies: [pyupgrade==3.3.1]
Expand Down
2 changes: 0 additions & 2 deletions docs/exts/xref.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,10 @@ def xref(typ, rawtext, text, lineno, inliner, options=None, content=None):


def get_refs(app):

xref.links = app.config.xref_links


def setup(app):

app.add_config_value('xref_links', {}, True)
app.add_role('xref', xref)
app.connect("builder-inited", get_refs)
1 change: 0 additions & 1 deletion src/pyhf/modifiers/normsys.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ class normsys_combined:
def __init__(
self, modifiers, pdfconfig, builder_data, interpcode='code1', batch_size=None
):

self.interpcode = interpcode
assert self.interpcode in ['code1', 'code4']

Expand Down
1 change: 0 additions & 1 deletion src/pyhf/modifiers/staterror.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ class staterror_combined:
op_code = 'multiplication'

def __init__(self, modifiers, pdfconfig, builder_data, batch_size=None):

default_backend = pyhf.default_backend
self.batch_size = batch_size

Expand Down
1 change: 0 additions & 1 deletion src/pyhf/optimize/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ def _internal_minimize(
options={},
par_names=None,
):

minimizer = self._get_minimizer(
func,
x0,
Expand Down
2 changes: 0 additions & 2 deletions src/pyhf/optimize/opt_minuit.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ def _get_minimizer(
do_grad=False,
par_names=None,
):

fixed_vals = fixed_vals or []
# Minuit wants True/False for each parameter
fixed_bools = [False] * len(init_pars)
Expand Down Expand Up @@ -82,7 +81,6 @@ def _minimize(
fixed_vals=None,
options={},
):

"""
Same signature as :func:`scipy.optimize.minimize`.
Expand Down
1 change: 0 additions & 1 deletion src/pyhf/parameters/paramview.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ class ParamViewer:
"""

def __init__(self, shape, par_map, par_selection):

default_backend = pyhf.default_backend

batch_size = shape[0] if len(shape) > 1 else None
Expand Down
2 changes: 0 additions & 2 deletions tests/test_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,6 @@ def test_import_histosys():


def test_import_filecache(mocker):

mocker.patch("pyhf.readxml.uproot.open", wraps=uproot.open)

pyhf.readxml.clear_filecache()
Expand Down Expand Up @@ -458,7 +457,6 @@ def test_process_modifiers(mocker, caplog):


def test_import_validation_exception(mocker, caplog):

mocker.patch(
'pyhf.schema.validate',
side_effect=pyhf.exceptions.InvalidSpecification(
Expand Down
1 change: 0 additions & 1 deletion validation/standard_hypo_test_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ def standard_hypo_test_demo(
sb_model_name="ModelConfig",
data_name="obsData",
):

file = ROOT.TFile.Open(infile)
workspace = file.Get(workspace_name)
sb_model = workspace.obj(sb_model_name)
Expand Down

0 comments on commit 2b168b7

Please sign in to comment.