Skip to content

Commit 4e21ce7

Browse files
authored
Merge pull request #16 from matsoftware/issue-n-12
Do not initialize matplotlib if generate-graphs is not passed
2 parents eab5547 + c3463ec commit 4e21ce7

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99
### Fixed
1010

1111
- [PR-11](https://github.com/matsoftware/swift-code-metrics/pull/11) Improved layout of bar plots for codebases with many frameworks
12+
- [Issue-12](https://github.com/matsoftware/swift-code-metrics/issues/12) `matplotlib` not initialized if `generate-graphs` is not passed
13+
1214

1315
## [1.3.0](https://github.com/matsoftware/swift-code-metrics/releases/tag/1.3.0) - 2019-03-14
1416

swift_code_metrics/scm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
from ._helpers import Log,ReportingHelpers
66
from ._analyzer import Inspector
7-
from ._presenter import GraphPresenter
87
from ._metrics import Metrics
98
from .version import VERSION
109
import sys
@@ -75,6 +74,7 @@ def main():
7574
sys.exit(0)
7675

7776
# Creates graphs
77+
from ._presenter import GraphPresenter
7878
graph_presenter = GraphPresenter(artifacts)
7979
non_test_frameworks = analyzer.filtered_frameworks(is_test=False)
8080
test_frameworks = analyzer.filtered_frameworks(is_test=True)

0 commit comments

Comments
 (0)