grimp 3.3__tar.gz → 3.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. {grimp-3.3 → grimp-3.4}/PKG-INFO +1 -1
  2. {grimp-3.3 → grimp-3.4}/pyproject.toml +1 -1
  3. {grimp-3.3 → grimp-3.4}/rust/src/importgraph.rs +5 -9
  4. {grimp-3.3 → grimp-3.4}/src/grimp/__init__.py +1 -1
  5. {grimp-3.3 → grimp-3.4}/README.rst +0 -0
  6. {grimp-3.3 → grimp-3.4}/rust/.cargo/config +0 -0
  7. {grimp-3.3 → grimp-3.4}/rust/Cargo.lock +0 -0
  8. {grimp-3.3 → grimp-3.4}/rust/Cargo.toml +0 -0
  9. {grimp-3.3 → grimp-3.4}/rust/src/containers.rs +0 -0
  10. {grimp-3.3 → grimp-3.4}/rust/src/dependencies.rs +0 -0
  11. {grimp-3.3 → grimp-3.4}/rust/src/layers.rs +0 -0
  12. {grimp-3.3 → grimp-3.4}/rust/src/lib.rs +0 -0
  13. {grimp-3.3 → grimp-3.4}/rust/tests/large.rs +0 -0
  14. {grimp-3.3 → grimp-3.4}/rust/tests/large_graph.json +0 -0
  15. {grimp-3.3 → grimp-3.4}/src/grimp/adaptors/__init__.py +0 -0
  16. {grimp-3.3 → grimp-3.4}/src/grimp/adaptors/_layers.py +0 -0
  17. {grimp-3.3 → grimp-3.4}/src/grimp/adaptors/caching.py +0 -0
  18. {grimp-3.3 → grimp-3.4}/src/grimp/adaptors/filesystem.py +0 -0
  19. {grimp-3.3 → grimp-3.4}/src/grimp/adaptors/graph.py +0 -0
  20. {grimp-3.3 → grimp-3.4}/src/grimp/adaptors/importscanner.py +0 -0
  21. {grimp-3.3 → grimp-3.4}/src/grimp/adaptors/modulefinder.py +0 -0
  22. {grimp-3.3 → grimp-3.4}/src/grimp/adaptors/packagefinder.py +0 -0
  23. {grimp-3.3 → grimp-3.4}/src/grimp/adaptors/timing.py +0 -0
  24. {grimp-3.3 → grimp-3.4}/src/grimp/algorithms/__init__.py +0 -0
  25. {grimp-3.3 → grimp-3.4}/src/grimp/algorithms/shortest_path.py +0 -0
  26. {grimp-3.3 → grimp-3.4}/src/grimp/application/__init__.py +0 -0
  27. {grimp-3.3 → grimp-3.4}/src/grimp/application/config.py +0 -0
  28. {grimp-3.3 → grimp-3.4}/src/grimp/application/ports/__init__.py +0 -0
  29. {grimp-3.3 → grimp-3.4}/src/grimp/application/ports/caching.py +0 -0
  30. {grimp-3.3 → grimp-3.4}/src/grimp/application/ports/filesystem.py +0 -0
  31. {grimp-3.3 → grimp-3.4}/src/grimp/application/ports/graph.py +0 -0
  32. {grimp-3.3 → grimp-3.4}/src/grimp/application/ports/importscanner.py +0 -0
  33. {grimp-3.3 → grimp-3.4}/src/grimp/application/ports/modulefinder.py +0 -0
  34. {grimp-3.3 → grimp-3.4}/src/grimp/application/ports/packagefinder.py +0 -0
  35. {grimp-3.3 → grimp-3.4}/src/grimp/application/ports/timing.py +0 -0
  36. {grimp-3.3 → grimp-3.4}/src/grimp/application/usecases.py +0 -0
  37. {grimp-3.3 → grimp-3.4}/src/grimp/domain/__init__.py +0 -0
  38. {grimp-3.3 → grimp-3.4}/src/grimp/domain/analysis.py +0 -0
  39. {grimp-3.3 → grimp-3.4}/src/grimp/domain/valueobjects.py +0 -0
  40. {grimp-3.3 → grimp-3.4}/src/grimp/exceptions.py +0 -0
  41. {grimp-3.3 → grimp-3.4}/src/grimp/helpers.py +0 -0
  42. {grimp-3.3 → grimp-3.4}/src/grimp/main.py +0 -0
  43. {grimp-3.3 → grimp-3.4}/src/grimp/py.typed +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: grimp
3
- Version: 3.3
3
+ Version: 3.4
4
4
  Classifier: Development Status :: 5 - Production/Stable
5
5
  Classifier: Intended Audience :: Developers
6
6
  Classifier: License :: OSI Approved :: BSD License
@@ -8,7 +8,7 @@ module-name = "grimp._rustgrimp"
8
8
 
9
9
  [project]
10
10
  name = "grimp"
11
- version = "3.3"
11
+ version = "3.4"
12
12
  license = {text = "BSD 2-Clause License"}
13
13
  description = "Builds a queryable graph of the imports within one or more Python packages."
14
14
  authors = [
@@ -77,23 +77,19 @@ impl<'a> ImportGraph<'a> {
77
77
  }
78
78
 
79
79
  pub fn add_import_ids(&mut self, importer: u32, imported: u32) {
80
- let mut importeds = self.importeds_by_importer[&importer].clone();
80
+ let importeds = self.importeds_by_importer.get_mut(&importer).unwrap();
81
81
  importeds.insert(imported);
82
- self.importeds_by_importer.insert(importer, importeds);
83
82
 
84
- let mut importers = self.importers_by_imported[&imported].clone();
83
+ let importers = self.importers_by_imported.get_mut(&imported).unwrap();
85
84
  importers.insert(importer);
86
- self.importers_by_imported.insert(imported, importers);
87
85
  }
88
86
 
89
87
  pub fn remove_import_ids(&mut self, importer: u32, imported: u32) {
90
- let mut importeds = self.importeds_by_importer[&importer].clone();
88
+ let importeds = self.importeds_by_importer.get_mut(&importer).unwrap();
91
89
  importeds.remove(&imported);
92
- self.importeds_by_importer.insert(importer, importeds);
93
90
 
94
- let mut importers = self.importers_by_imported[&imported].clone();
91
+ let importers = self.importers_by_imported.get_mut(&imported).unwrap();
95
92
  importers.remove(&importer);
96
- self.importers_by_imported.insert(imported, importers);
97
93
  }
98
94
 
99
95
  pub fn remove_module_by_id(&mut self, module_id: u32) {
@@ -119,8 +115,8 @@ impl<'a> ImportGraph<'a> {
119
115
 
120
116
  pub fn get_descendant_ids(&self, module_name: &str) -> Vec<u32> {
121
117
  let mut descendant_ids = vec![];
118
+ let namespace: String = format!("{}.", module_name);
122
119
  for (candidate_name, candidate_id) in &self.ids_by_name {
123
- let namespace: String = format!("{}.", module_name);
124
120
  if candidate_name.starts_with(&namespace) {
125
121
  descendant_ids.push(*candidate_id);
126
122
  }
@@ -1,4 +1,4 @@
1
- __version__ = "3.3"
1
+ __version__ = "3.4"
2
2
 
3
3
  from .application.ports.graph import DetailedImport, ImportGraph
4
4
  from .domain.analysis import PackageDependency, Route
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes