Skip to content

Commit 578a2f6

Browse files
committed
more conventional, newer Python style
* __main__ -> main, start * Start Explicit imports * Sort main classes alphabetically
1 parent 3050dc8 commit 578a2f6

7 files changed

Lines changed: 52 additions & 2063 deletions

File tree

.pre-commit-config.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ repos:
2121
language_version: python3
2222
exclude: 'pymathics/graph/version.py'
2323
stages: [commit]
24-
- repo: https://github.com/pycqa/flake8
25-
rev: 3.9.2
26-
hooks:
27-
- id: flake8
28-
stages: [commit]
24+
# - repo: https://github.com/pycqa/flake8
25+
# rev: 3.9.2
26+
# hooks:
27+
# - id: flake8
28+
# stages: [commit]

pymathics/graph/__init__.py

Lines changed: 41 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Pymathics Graph - Working with Graphs (Vertices and Edges)
22
3-
This module provides functions and variables for workting with
3+
This module provides functions and variables for working with
44
graphs.
55
66
Example:
@@ -11,14 +11,52 @@
1111
In[4]:= CompleteKaryTree[3, VertexLabels->True]
1212
"""
1313

14-
from pymathics.graph.__main__ import * # noqa
14+
from pymathics.graph.main import (
15+
AcyclicGraphQ,
16+
BetweennessCentrality,
17+
ClosenessCentrality,
18+
ConnectedGraphQ,
19+
DegreeCentrality,
20+
DirectedEdge,
21+
DirectedGraphQ,
22+
EdgeConnectivity,
23+
EdgeCount,
24+
EdgeIndex,
25+
EdgeList,
26+
EdgeRules,
27+
EigenvectorCentrality,
28+
FindShortestPath,
29+
FindVertexCut,
30+
Graph,
31+
GraphBox,
32+
HITSCentrality,
33+
HighlightGraph,
34+
KatzCentrality,
35+
LoopFreeGraphQ,
36+
MixedGraphQ,
37+
MultigraphQ,
38+
PageRankCentrality,
39+
PlanarGraphQ,
40+
PathGraphQ,
41+
Property,
42+
PropertyValue,
43+
SimpleGraphQ,
44+
UndirectedEdge,
45+
VertexAdd,
46+
VertexConnectivity,
47+
VertexCount,
48+
VertexDegree,
49+
VertexDelete,
50+
VertexIndex,
51+
VertexList,
52+
)
1553
from pymathics.graph.algorithms import * # noqa
1654
from pymathics.graph.generators import * # noqa
1755
from pymathics.graph.tree import * # noqa
1856
from pymathics.graph.version import __version__ # noqa
1957

2058
pymathics_version_data = {
21-
"author": "The Mathics Team",
59+
"author": "The Mathics3 Team",
2260
"version": __version__,
2361
"name": "Graph",
2462
"requires": ["networkx"],

0 commit comments

Comments
 (0)