Skip to content

Commit c0e6059

Browse files
authored
Merge pull request #114 from ArcanaFramework/import-sorting
Ran isort over all Python files
2 parents 8f8739d + f07bbda commit c0e6059

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+411
-333
lines changed

fileformats/application/__init__.py

Lines changed: 56 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,11 @@
11
from fileformats.core import __version__
2-
from .archive import (
3-
Archive,
4-
Zip,
5-
Bzip,
6-
Gzip,
7-
Tar,
8-
TarGzip,
9-
)
10-
from .document import (
11-
Document,
12-
Pdf,
13-
Msword,
14-
MswordX,
15-
Postscript,
16-
)
17-
from .serialization import (
18-
Schema,
19-
JsonSchema,
20-
XmlSchema,
21-
InformalSchema,
22-
TextSerialization,
23-
Xml,
24-
Json,
25-
Yaml,
26-
Toml,
27-
)
2+
3+
from .archive import Archive, Bzip, Gzip, Tar, TarGzip, Zip
4+
from .document import Document, Msword, MswordX, Pdf, Postscript
285
from .medical import Dicom
296
from .misc import (
30-
_1dInterleavedParityfec,
31-
_3gpdashQoeReport__Xml,
32-
_3gpphal__Json,
33-
_3gpphalforms__Json,
34-
_3gppIms__Xml,
7+
H224,
8+
P21,
359
A2l,
3610
Ace__Cbor,
3711
Ace__Json,
@@ -44,13 +18,13 @@
4418
AltoCostmap__Json,
4519
AltoCostmapfilter__Json,
4620
AltoDirectory__Json,
47-
AltoEndpointprop__Json,
48-
AltoEndpointpropparams__Json,
4921
AltoEndpointcost__Json,
5022
AltoEndpointcostparams__Json,
23+
AltoEndpointprop__Json,
24+
AltoEndpointpropparams__Json,
5125
AltoError__Json,
52-
AltoNetworkmapfilter__Json,
5326
AltoNetworkmap__Json,
27+
AltoNetworkmapfilter__Json,
5428
AltoPropmap__Json,
5529
AltoPropmapparams__Json,
5630
AltoUpdatestreamcontrol__Json,
@@ -102,20 +76,20 @@
10276
Cfw,
10377
City__Json,
10478
Clr,
105-
ClueInfo__Xml,
10679
Clue__Xml,
80+
ClueInfo__Xml,
10781
Cms,
10882
Cnrp__Xml,
10983
CoapGroup__Json,
11084
CoapPayload,
11185
Commonground,
11286
ConciseProblemDetails__Cbor,
11387
ConferenceInfo__Xml,
114-
Cpl__Xml,
11588
Cose,
11689
CoseKey,
11790
CoseKeySet,
11891
CoseX509,
92+
Cpl__Xml,
11993
Csrattrs,
12094
Csta__Xml,
12195
Cstadata__Xml,
@@ -125,8 +99,8 @@
12599
Cwt,
126100
Cybercash,
127101
Dash__Xml,
128-
DashPatch__Xml,
129102
Dashdelta,
103+
DashPatch__Xml,
130104
Davmount__Xml,
131105
DcaRft,
132106
Dcd,
@@ -185,7 +159,6 @@
185159
Geoxacml__Xml,
186160
GltfBuffer,
187161
Gml__Xml,
188-
H224,
189162
Held__Xml,
190163
Hl7v2__Xml,
191164
Http,
@@ -243,12 +216,12 @@
243216
MbmsAssociatedProcedureDescription__Xml,
244217
MbmsDeregister__Xml,
245218
MbmsEnvelope__Xml,
246-
MbmsMskResponse__Xml,
247219
MbmsMsk__Xml,
220+
MbmsMskResponse__Xml,
248221
MbmsProtectionDescription__Xml,
249222
MbmsReceptionReport__Xml,
250-
MbmsRegisterResponse__Xml,
251223
MbmsRegister__Xml,
224+
MbmsRegisterResponse__Xml,
252225
MbmsSchedule__Xml,
253226
MbmsUserServiceDescription__Xml,
254227
Mbox,
@@ -265,12 +238,12 @@
265238
MmtAei__Xml,
266239
MmtUsd__Xml,
267240
Mods__Xml,
268-
MossKeys,
269-
MossSignature,
270241
MosskeyData,
271242
MosskeyRequest,
272-
Mp21,
243+
MossKeys,
244+
MossSignature,
273245
Mp4,
246+
Mp21,
274247
Mpeg4Generic,
275248
Mpeg4Iod,
276249
Mpeg4IodXmt,
@@ -281,15 +254,15 @@
281254
Mud__Json,
282255
MultipartCore,
283256
Mxf,
284-
NQuads,
285-
NTriples,
286257
Nasdata,
287258
NewsCheckgroups,
288259
NewsGroupinfo,
289260
NewsTransmission,
290261
Nlsml__Xml,
291262
Node,
263+
NQuads,
292264
Nss,
265+
NTriples,
293266
OauthAuthzReq__Jwt,
294267
ObliviousDnsMessage,
295268
OcspRequest,
@@ -304,9 +277,8 @@
304277
OpcNodeset__Xml,
305278
Oscore,
306279
Oxps,
307-
P21,
308-
P21__Zip,
309280
P2pOverlay__Xml,
281+
P21__Zip,
310282
Parityfec,
311283
Passport,
312284
PatchOpsError__Xml,
@@ -315,19 +287,20 @@
315287
PgpEncrypted,
316288
PgpKeys,
317289
PgpSignature,
318-
PidfDiff__Xml,
319290
Pidf__Xml,
320-
Pkcs10,
291+
PidfDiff__Xml,
321292
Pkcs7Mime,
322293
Pkcs7Signature,
323294
Pkcs8,
324295
Pkcs8Encrypted,
296+
Pkcs10,
325297
Pkcs12,
298+
PkiMessage,
326299
PkixAttrCert,
327300
PkixCert,
301+
Pkixcmp,
328302
PkixCrl,
329303
PkixPkipath,
330-
Pkixcmp,
331304
Pls__Xml,
332305
PocSettings__Xml,
333306
PpspTracker__Json,
@@ -347,22 +320,22 @@
347320
Prs_Xsf__Xml,
348321
Pskc__Xml,
349322
Pvd__Json,
350-
Rdf__Xml,
351-
RouteApd__Xml,
352-
RouteSTsid__Xml,
353-
RouteUsd__Xml,
354323
Qsig,
355324
Raptorfec,
356325
Rdap__Json,
326+
Rdf__Xml,
357327
Reginfo__Xml,
358328
RelaxNgCompactSyntax,
359329
Reputon__Json,
360-
ResourceListsDiff__Xml,
361330
ResourceLists__Xml,
331+
ResourceListsDiff__Xml,
362332
Rfc__Xml,
363333
Riscos,
364334
Rlmi__Xml,
365335
RlsServices__Xml,
336+
RouteApd__Xml,
337+
RouteSTsid__Xml,
338+
RouteUsd__Xml,
366339
RpkiChecklist,
367340
RpkiGhostbusters,
368341
RpkiManifest,
@@ -374,8 +347,8 @@
374347
Rtx,
375348
Samlassertion__Xml,
376349
Samlmetadata__Xml,
377-
SarifExternalProperties__Json,
378350
Sarif__Json,
351+
SarifExternalProperties__Json,
379352
Sbe,
380353
Sbml__Xml,
381354
Scaip__Xml,
@@ -386,18 +359,18 @@
386359
ScvpVpResponse,
387360
Sdp,
388361
Secevent__Jwt,
389-
SenmlEtch__Cbor,
390-
SenmlEtch__Json,
391-
SenmlExi,
392362
Senml__Cbor,
393363
Senml__Json,
394364
Senml__Xml,
395-
SensmlExi,
365+
SenmlEtch__Cbor,
366+
SenmlEtch__Json,
367+
SenmlExi,
396368
Sensml__Cbor,
397369
Sensml__Json,
398370
Sensml__Xml,
399-
SepExi,
371+
SensmlExi,
400372
Sep__Xml,
373+
SepExi,
401374
SessionInfo,
402375
SetPayment,
403376
SetPaymentInitiation,
@@ -417,8 +390,8 @@
417390
Soap__Fastinfoset,
418391
Soap__Xml,
419392
SparqlQuery,
420-
Spdx__Json,
421393
SparqlResults__Xml,
394+
Spdx__Json,
422395
SpiritsEvent__Xml,
423396
Sql,
424397
Srgs,
@@ -444,9 +417,9 @@
444417
Tei__Xml,
445418
TetraIsi,
446419
Thraud__Xml,
420+
TimestampedData,
447421
TimestampQuery,
448422
TimestampReply,
449-
TimestampedData,
450423
Tlsrpt__Gzip,
451424
Tlsrpt__Json,
452425
Tm__Json,
@@ -479,21 +452,20 @@
479452
Wordperfect5_1,
480453
Wsdl__Xml,
481454
Wspolicy__Xml,
482-
PkiMessage,
483455
WwwFormUrlencoded,
456+
X400Bp,
484457
X509CaCert,
485458
X509CaRaCert,
486459
X509NextCaCert,
487-
X400Bp,
488460
Xacml__Xml,
489461
XcapAtt__Xml,
490462
XcapCaps__Xml,
491463
XcapDiff__Xml,
492464
XcapEl__Xml,
493465
XcapError__Xml,
494466
XcapNs__Xml,
495-
XconConferenceInfoDiff__Xml,
496467
XconConferenceInfo__Xml,
468+
XconConferenceInfoDiff__Xml,
497469
Xenc__Xml,
498470
Xfdf,
499471
Xhtml__Xml,
@@ -514,8 +486,25 @@
514486
Yin__Xml,
515487
Zlib,
516488
Zstd,
489+
_1dInterleavedParityfec,
490+
_3gpdashQoeReport__Xml,
491+
_3gpphal__Json,
492+
_3gpphalforms__Json,
493+
_3gppIms__Xml,
517494
)
518-
from fileformats.text import Javascript
495+
from .serialization import (
496+
InformalSchema,
497+
Json,
498+
JsonSchema,
499+
Schema,
500+
TextSerialization,
501+
Toml,
502+
Xml,
503+
XmlSchema,
504+
Yaml,
505+
)
506+
507+
from fileformats.text import Javascript # isort: skip
519508

520509
__all__ = [
521510
"__version__",

fileformats/application/archive.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
import typing as ty
2+
23
from fileformats.core import FileSet
3-
from fileformats.core.mixin import WithClassifier
4+
from fileformats.core.mixin import WithClassifier, WithMagicNumber
45
from fileformats.generic import BinaryFile
5-
from fileformats.core.mixin import WithMagicNumber
66

77

88
class Archive(BinaryFile):
99
"Base class for compressed archives"
10+
1011
archived_type: ty.Optional[ty.Type[FileSet]] = None
1112

1213

fileformats/application/document.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
from fileformats.core.mixin import WithMagicNumber
12
from fileformats.generic import BinaryFile
3+
24
from .archive import Zip
3-
from fileformats.core.mixin import WithMagicNumber
45

56

67
# Document formats

fileformats/application/medical.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import typing as ty
2-
from fileformats.generic import BinaryFile
2+
33
from fileformats.core.mixin import WithMagicNumber
4+
from fileformats.generic import BinaryFile
45

56
if ty.TYPE_CHECKING:
67
import pydicom
@@ -34,9 +35,9 @@ def pydicom_to_dict(
3435
The dictionary representation of the pydicom Dataset
3536
"""
3637
import pydicom.dataset
37-
import pydicom.valuerep
3838
import pydicom.multival
3939
import pydicom.uid
40+
import pydicom.valuerep
4041

4142
# Ensure that all keys are loaded before creating dictionary otherwise the keywords
4243
# will not be set in the elem

fileformats/application/misc.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import typing as ty
2-
from fileformats.generic import BinaryFile, File
2+
33
from fileformats.core.mixin import WithMagicNumber
4-
from .serialization import Xml, Json
4+
from fileformats.generic import BinaryFile, File
5+
6+
from .serialization import Json, Xml
57

68

79
class _1dInterleavedParityfec(File):

fileformats/application/serialization.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
import json
22
import typing as ty
3-
from fileformats.core.typing import TypeAlias
43
from pathlib import Path
5-
from fileformats.core import DataType, FileSet, extra_implementation
4+
5+
from fileformats.core import (
6+
DataType,
7+
FileSet,
8+
SampleFileGenerator,
9+
extra_implementation,
10+
)
11+
from fileformats.core.exceptions import FormatMismatchError
612
from fileformats.core.mixin import WithClassifier
13+
from fileformats.core.typing import TypeAlias
714
from fileformats.generic import UnicodeFile
8-
from fileformats.core.exceptions import FormatMismatchError
9-
from fileformats.core import SampleFileGenerator
10-
1115

1216
SerializationType: TypeAlias = ty.Union[ty.Dict[str, ty.Any], ty.List[ty.Any]]
1317

0 commit comments

Comments
 (0)