Skip to content

Commit c8ac899

Browse files
author
Michal Horejsek
committed
Lint
1 parent 133cd8b commit c8ac899

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

fastjsonschema/draft06.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ def generate_type(self):
5858
extra = ''
5959

6060
if 'integer' in types:
61-
extra += ' and not (isinstance({variable}, float) and {variable}.is_integer())'.format(variable=self._variable)
61+
extra += ' and not (isinstance({variable}, float) and {variable}.is_integer())'.format(
62+
variable=self._variable,
63+
)
6264

6365
if ('number' in types or 'integer' in types) and 'boolean' not in types:
6466
extra += ' or isinstance({variable}, bool)'.format(variable=self._variable)

fastjsonschema/draft07.py

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ class CodeGeneratorDraft07(CodeGeneratorDraft06):
1919

2020
def __init__(self, definition, resolver=None):
2121
super().__init__(definition, resolver)
22+
# pylint: disable=duplicate-code
2223
self._json_keywords_to_function.update((
2324
('if', self.generate_if_then_else),
2425
('contentEncoding', self.generate_content_encoding),

0 commit comments

Comments
 (0)