Skip to content

Commit dd9b23e

Browse files
author
red-ship-it
committed
Syntax error in yaml for pre-commit
1 parent 91f36aa commit dd9b23e

File tree

2 files changed

+35
-12
lines changed

2 files changed

+35
-12
lines changed

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ repos:
77
rev: 6.0.0
88
hooks:
99
- id: flake8
10-
args:
10+
args:
1111
- --ignore=E501
1212
- repo: https://github.com/pycqa/isort
1313
rev: 5.12.0

pillow_case/exif_node_maker.py

+34-11
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@
2929

3030
def n_cyber_object_to_node(graph):
3131
"""
32-
Initial function to create the blank nodes for each of the file's facet nodes
32+
Initial function to create the blank nodes for each of
33+
the file's facet nodes
3334
:param graph: rdflib graph object for adding nodes to
3435
:return: The four blank nodes for each fo the other functions to fill
3536
"""
@@ -39,7 +40,13 @@ def n_cyber_object_to_node(graph):
3940
n_content_facets = rdflib.BNode()
4041
n_exif_facets = rdflib.BNode()
4142
graph.add((cyber_object_facet, NS_RDF.type, NS_UCO_OBSERVABLE.ObservableObject))
42-
graph.add((cyber_object_facet, NS_UCO_OBSERVABLE.hasChanged, rdflib.Literal(False)))
43+
graph.add(
44+
(
45+
cyber_object_facet,
46+
NS_UCO_OBSERVABLE.hasChanged,
47+
rdflib.Literal(False),
48+
)
49+
)
4350
graph.add((cyber_object_facet, NS_UCO_CORE.hasFacet, n_exif_facets))
4451
graph.add((cyber_object_facet, NS_UCO_CORE.hasFacet, n_raster_facets))
4552
graph.add((cyber_object_facet, NS_UCO_CORE.hasFacet, n_file_facets))
@@ -51,7 +58,7 @@ def filefacets_object_to_node(graph, n_file_facets, file_information):
5158
Adding file facet object to the graph object
5259
:param graph: rdflib graph object for adding nodes to
5360
:param n_file_facets: file facet node to add facets of file to
54-
:param file_information: Dictionary containing information about file being analysed
61+
:param file_information: Dictionary containing info about file analysed
5562
:return: None
5663
"""
5764
file_name, ext = os.path.splitext(file_information["Filename"])
@@ -84,10 +91,10 @@ def filefacets_object_to_node(graph, n_file_facets, file_information):
8491

8592
def filecontent_object_to_node(graph, n_content_facets, file_information):
8693
"""
87-
Unused: Create a node that will add the file content facet node to the graph
94+
Unused: Create node to add the file content facet node to the graph
8895
:param graph: rdflib graph object for adding nodes to
89-
:param n_content_facets: Blank node to contain all of the content facet information
90-
:param file_information: Dictionary containing information about file being analysed
96+
:param n_content_facets: Blank node to contain content facet information
97+
:param file_information: Dictionary containing info about file analysed
9198
:return: None
9299
"""
93100
byte_order_facet = rdflib.BNode()
@@ -101,7 +108,13 @@ def filecontent_object_to_node(graph, n_content_facets, file_information):
101108
NS_UCO_VOCABULARY.EndiannessTypeVocab,
102109
)
103110
)
104-
graph.add((byte_order_facet, NS_UCO_VOCABULARY.value, rdflib.Literal("Big-endian")))
111+
graph.add(
112+
(
113+
byte_order_facet,
114+
NS_UCO_VOCABULARY.value,
115+
rdflib.Literal("Big-endian"),
116+
)
117+
)
105118
if "mimetype" in file_information.keys():
106119
graph.add(
107120
(
@@ -126,16 +139,20 @@ def raster_object_to_node(graph, controlled_dict, n_raster_facets, file_informat
126139
"""
127140
Adding file's raster facet objects to the graph object
128141
:param graph: rdflib graph object for adding nodes to
129-
:param controlled_dict: Dictionary containing the EXIF information from image
142+
:param controlled_dict: Dictionary containing EXIF information from image
130143
:param n_raster_facets: raster facet node to add raster facets of file to
131-
:param file_information: Dictionary containing information about file being analysed
144+
:param file_information: Dictionary containing info about file analysed
132145
:return: None
133146
"""
134147
file_name, ext = os.path.splitext(file_information["Filename"])
135148
file_ext = ext[1:]
136149
graph.add((n_raster_facets, NS_RDF.type, NS_UCO_OBSERVABLE.RasterPictureFacet))
137150
graph.add(
138-
(n_raster_facets, NS_UCO_OBSERVABLE.pictureType, rdflib.Literal(file_ext))
151+
(
152+
n_raster_facets,
153+
NS_UCO_OBSERVABLE.pictureType,
154+
rdflib.Literal(file_ext),
155+
)
139156
)
140157
# :TODO The below feels a bit hacky probably a better way to do it
141158
if "EXIF ExifImageLength" in controlled_dict.keys():
@@ -227,7 +244,13 @@ def controlled_dictionary_object_to_node(graph, controlled_dict, n_exif_facet):
227244
n_controlled_dictionary = rdflib.BNode()
228245
graph.add((n_exif_facet, NS_RDF.type, NS_UCO_OBSERVABLE.EXIFFacet))
229246
graph.add((n_exif_facet, NS_UCO_OBSERVABLE.exifData, n_controlled_dictionary))
230-
graph.add((n_controlled_dictionary, NS_RDF.type, NS_UCO_TYPES.ControlledDictionary))
247+
graph.add(
248+
(
249+
n_controlled_dictionary,
250+
NS_RDF.type,
251+
NS_UCO_TYPES.ControlledDictionary,
252+
)
253+
)
231254
for key in sorted(controlled_dict.keys()):
232255
# :TODO stringing all values to ensure they are strings, open to input
233256
# here as maybe assertion or a better way to do this

0 commit comments

Comments
 (0)