ry-cli 0.1.0__tar.gz → 0.2.0__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 (31) hide show
  1. ry_cli-0.2.0/.github/logo.png +0 -0
  2. ry_cli-0.2.0/CHANGELOG.md +20 -0
  3. {ry_cli-0.1.0 → ry_cli-0.2.0}/Cargo.lock +1 -1
  4. {ry_cli-0.1.0 → ry_cli-0.2.0}/Cargo.toml +1 -1
  5. {ry_cli-0.1.0 → ry_cli-0.2.0}/PKG-INFO +1 -1
  6. ry_cli-0.2.0/src/generation.rs +1 -0
  7. {ry_cli-0.1.0 → ry_cli-0.2.0}/src/main.rs +12 -9
  8. {ry_cli-0.1.0 → ry_cli-0.2.0}/src/module.rs +0 -4
  9. ry_cli-0.1.0/.github/logo.png +0 -0
  10. ry_cli-0.1.0/CHANGELOG.md +0 -8
  11. ry_cli-0.1.0/config.example.yaml +0 -46
  12. ry_cli-0.1.0/src/generation.rs +0 -42
  13. {ry_cli-0.1.0 → ry_cli-0.2.0}/.github/workflows/publish-python.yml +0 -0
  14. {ry_cli-0.1.0 → ry_cli-0.2.0}/.github/workflows/release-please.yml +0 -0
  15. {ry_cli-0.1.0 → ry_cli-0.2.0}/.gitignore +0 -0
  16. {ry_cli-0.1.0 → ry_cli-0.2.0}/LICENSE +0 -0
  17. {ry_cli-0.1.0 → ry_cli-0.2.0}/README.md +0 -0
  18. {ry_cli-0.1.0 → ry_cli-0.2.0}/pyproject.toml +0 -0
  19. {ry_cli-0.1.0 → ry_cli-0.2.0}/src/config.rs +0 -0
  20. {ry_cli-0.1.0 → ry_cli-0.2.0}/src/diagnostics.rs +0 -0
  21. {ry_cli-0.1.0 → ry_cli-0.2.0}/src/inline.rs +0 -0
  22. {ry_cli-0.1.0 → ry_cli-0.2.0}/src/lib.rs +0 -0
  23. {ry_cli-0.1.0 → ry_cli-0.2.0}/src/packages.rs +0 -0
  24. {ry_cli-0.1.0 → ry_cli-0.2.0}/src/treesitter.rs +0 -0
  25. {ry_cli-0.1.0 → ry_cli-0.2.0}/tests/fixtures/basic_async_to_sync/expected.py +0 -0
  26. {ry_cli-0.1.0 → ry_cli-0.2.0}/tests/fixtures/basic_async_to_sync/input.py +0 -0
  27. {ry_cli-0.1.0 → ry_cli-0.2.0}/tests/fixtures/basic_async_to_sync/ry.yml +0 -0
  28. {ry_cli-0.1.0 → ry_cli-0.2.0}/tests/fixtures/tag_rules/expected.py +0 -0
  29. {ry_cli-0.1.0 → ry_cli-0.2.0}/tests/fixtures/tag_rules/input.py +0 -0
  30. {ry_cli-0.1.0 → ry_cli-0.2.0}/tests/fixtures/tag_rules/ry.yml +0 -0
  31. {ry_cli-0.1.0 → ry_cli-0.2.0}/tests/fixtures.rs +0 -0
Binary file
@@ -0,0 +1,20 @@
1
+ # Changelog
2
+
3
+ ## [0.2.0](https://github.com/karpetrosyan/ry/compare/v0.1.0...v0.2.0) (2026-04-09)
4
+
5
+
6
+ ### Features
7
+
8
+ * add support for passing multiple PATHs ([27f91f7](https://github.com/karpetrosyan/ry/commit/27f91f7a5b5db7b6bb803a6e896fe09c96456f36))
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * remove redundant generation file ([fe9dbc4](https://github.com/karpetrosyan/ry/commit/fe9dbc4a66392c96019799746c09bd0992dd4d53))
14
+
15
+ ## 0.1.0 (2026-04-08)
16
+
17
+
18
+ ### Features
19
+
20
+ * first release ([e1aed91](https://github.com/karpetrosyan/ry/commit/e1aed91f6370bb3832b72be8164c4591e456d0da))
@@ -375,7 +375,7 @@ dependencies = [
375
375
 
376
376
  [[package]]
377
377
  name = "ry"
378
- version = "0.1.0"
378
+ version = "0.2.0"
379
379
  dependencies = [
380
380
  "clap",
381
381
  "glob",
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "ry"
3
- version = "0.1.0"
3
+ version = "0.2.0"
4
4
  edition = "2021"
5
5
  readme = "README.md"
6
6
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ry-cli
3
- Version: 0.1.0
3
+ Version: 0.2.0
4
4
  Classifier: Development Status :: 4 - Beta
5
5
  Classifier: Intended Audience :: Developers
6
6
  Classifier: Programming Language :: Python :: 3
@@ -0,0 +1 @@
1
+
@@ -19,8 +19,8 @@ struct Cli {
19
19
  #[arg(long, help = "Apply fixes instead of just checking")]
20
20
  fix: bool,
21
21
 
22
- #[arg(default_value = ".", help = "Path to search for Python files")]
23
- path: String,
22
+ #[arg(default_value = ".", help = "Paths to search for Python files")]
23
+ paths: Vec<String>,
24
24
  }
25
25
 
26
26
  fn grab_effective_paths(input_path: &Path) -> Result<Vec<PathBuf>, String> {
@@ -63,15 +63,18 @@ fn main() {
63
63
  }
64
64
  };
65
65
 
66
- let input_path = Path::new(&cli.path);
66
+ let mut paths_to_process = Vec::new();
67
67
 
68
- let paths_to_process = match grab_effective_paths(input_path) {
69
- Ok(paths) => paths,
70
- Err(e) => {
71
- eprintln!("Error: {}", e);
72
- std::process::exit(1);
68
+ for path in &cli.paths {
69
+ let input_path = Path::new(path);
70
+ match grab_effective_paths(input_path) {
71
+ Ok(mut paths) => paths_to_process.append(&mut paths),
72
+ Err(e) => {
73
+ eprintln!("Error: {}", e);
74
+ std::process::exit(1);
75
+ }
73
76
  }
74
- };
77
+ }
75
78
 
76
79
  let mut diagnostics = Vec::new();
77
80
  let mut fixed_diagnostics = Vec::new();
@@ -1,7 +1,6 @@
1
1
  use crate::apply_rules;
2
2
  use crate::config::{Config, TargetVariant};
3
3
  use crate::diagnostics::Diagnostic;
4
- use crate::generation::Generation;
5
4
  use std::fs;
6
5
 
7
6
  pub fn process_all_file_targets(
@@ -40,9 +39,6 @@ pub fn process_all_file_targets(
40
39
  fs::write(output, transformed)
41
40
  .map_err(|e| format!("Error writing output file '{}': {}", output, e))?;
42
41
 
43
- let generation = Generation::file(input, output);
44
- println!("{}", generation);
45
-
46
42
  fixed_diagnostics.push(diagnostic);
47
43
  }
48
44
  }
Binary file
ry_cli-0.1.0/CHANGELOG.md DELETED
@@ -1,8 +0,0 @@
1
- # Changelog
2
-
3
- ## 0.1.0 (2026-04-08)
4
-
5
-
6
- ### Features
7
-
8
- * first release ([e1aed91](https://github.com/karpetrosyan/ry/commit/e1aed91f6370bb3832b72be8164c4591e456d0da))
@@ -1,46 +0,0 @@
1
- version: 1
2
-
3
- defaults:
4
- include:
5
- - package: std
6
-
7
- packages:
8
- std:
9
- rules:
10
- - id: dunder-anext
11
- kind: regex
12
- match: '\b__anext__\b'
13
- replace: '__next__'
14
-
15
- - id: dunder-aenter
16
- kind: regex
17
- match: '\b__aenter__\b'
18
- replace: '__enter__'
19
-
20
- - id: dunder-aexit
21
- kind: regex
22
- match: '\b__aexit__\b'
23
- replace: '__exit__'
24
-
25
- targets:
26
- # File-to-file transformation (reads input file, writes to output file)
27
- # - input: "foo/bar/async_something.py"
28
- # output: "foo/bar/sync_something.py"
29
-
30
- # - input: "foo/bar/baz.py"
31
- # output: "foo/bar/bee.py"
32
- # inherit_defaults: false
33
- # include:
34
- # - package: std
35
- # exclude:
36
- # - dunder-aexit
37
- # rules:
38
- # - id: strip-await
39
- # kind: regex
40
- # match: '\bawait\s+'
41
- # replace: ''
42
-
43
- # Inline transformation (looks for # unasync: generate @tag markers in files)
44
- # Run with: ry --config ry.yml <path>
45
- # Example: ry --config ry.yml src/
46
- - tag: asd
@@ -1,42 +0,0 @@
1
- use std::fmt;
2
-
3
- pub enum GenerationKind {
4
- File { output_file: String },
5
- Inline { line: usize },
6
- }
7
-
8
- pub struct Generation {
9
- pub source_file: String,
10
- pub kind: GenerationKind,
11
- }
12
-
13
- impl Generation {
14
- pub fn file(source_file: impl Into<String>, output_file: impl Into<String>) -> Self {
15
- Self {
16
- source_file: source_file.into(),
17
- kind: GenerationKind::File {
18
- output_file: output_file.into(),
19
- },
20
- }
21
- }
22
-
23
- pub fn inline(source_file: impl Into<String>, line: usize) -> Self {
24
- Self {
25
- source_file: source_file.into(),
26
- kind: GenerationKind::Inline { line },
27
- }
28
- }
29
- }
30
-
31
- impl fmt::Display for Generation {
32
- fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
33
- match &self.kind {
34
- GenerationKind::File { output_file } => {
35
- write!(f, "{} -> {}", self.source_file, output_file)
36
- }
37
- GenerationKind::Inline { line } => {
38
- write!(f, "{}:{}: generated inline block", self.source_file, line)
39
- }
40
- }
41
- }
42
- }
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