<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Sami Jneidy</title>
    <description>The latest articles on DEV Community by Sami Jneidy (@sami_jneidy_0d941643118b5).</description>
    <link>https://dev.to/sami_jneidy_0d941643118b5</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2434068%2Fe361b4b4-9a78-4712-a85b-fe8a84a4e5ee.png</url>
      <title>DEV Community: Sami Jneidy</title>
      <link>https://dev.to/sami_jneidy_0d941643118b5</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sami_jneidy_0d941643118b5"/>
    <language>en</language>
    <item>
      <title>I built a small CLI tool to convert relative imports to absolute imports during a large refactoring</title>
      <dc:creator>Sami Jneidy</dc:creator>
      <pubDate>Sat, 21 Feb 2026 05:57:16 +0000</pubDate>
      <link>https://dev.to/sami_jneidy_0d941643118b5/i-built-a-small-cli-tool-to-convert-relative-imports-to-absolute-imports-during-a-large-refactoring-1i4a</link>
      <guid>https://dev.to/sami_jneidy_0d941643118b5/i-built-a-small-cli-tool-to-convert-relative-imports-to-absolute-imports-during-a-large-refactoring-1i4a</guid>
      <description>&lt;p&gt;While refactoring a large Python project, I ran into an issue — the project had a lot of deeply nested relative imports (from ..module import x). The team decided to standardize everything to absolute imports, and here was the issue: manually updating them was very tedious, especially across many levels of relative imports.&lt;br&gt;
So I wrote a small CLI tool that converts relative imports to absolute ones. The tool:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Traverses the project directory&lt;/li&gt;
&lt;li&gt;Detects relative imports of type (from ..A import B)&lt;/li&gt;
&lt;li&gt;Converts them to absolute imports based on a given root package&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It’s lightweight and dependency-free. Nothing fancy — just a utility that solved a real problem for me and I thought it might be useful for some people.&lt;br&gt;
If anyone is going through a similar refactor, feel free to check it out on github:&lt;br&gt;
&lt;a href="https://github.com/SamiJneidy/relative2absolute" rel="noopener noreferrer"&gt;github&lt;/a&gt;&lt;br&gt;
and you can install it using pip also.&lt;br&gt;
I know it's very minimal, but I would appreciate feedback or suggestions.&lt;/p&gt;

</description>
      <category>python</category>
      <category>opensource</category>
      <category>cli</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
