並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 27 件 / 27件

新着順 人気順

vs code python formatter blackの検索結果1 - 27 件 / 27件

  • 主にVSCodeではじめるPython開発環境構築ガイド | DevelopersIO

    ファイル比較 VSCodeのエクスプローラで、ファイル2つを選択して右クリックメニューから「選択項目を比較」で比較することができます。 また右クリックで、「比較対象の選択」をした後に「選択項目を比較」でも比較することも可能です。 VSCodeのSnippetの使い方 VSCodeのSnippetも便利です。似たような構造のクラスを実装する場合などや、プロジェクト共通で使いがちな書き方というものをSnippetに登録して、効率化することができます。 また、変数を持たせておくこともできます。この場合、Snippetを呼び出した後に変数部分にカーソルがあたるので、そこで変数部分をタイピングできます。 詳細は以下のリンクをご覧ください。 Visual Studio Codeに定型文(スニペット)を登録する方法 VSCodeのUser Snippetを活用しよう! また後述するSnippet Gen

      主にVSCodeではじめるPython開発環境構築ガイド | DevelopersIO
    • 2024年のPythonプログラミング - Uzabase for Engineers

      ソーシャル経済メディア「NewsPicks」で推薦や検索などのアルゴリズム開発をしている北内です。Pythonは頻繁に新機能や便利なライブラリが登場し、ベストプラクティスの変化が激しい言語です。そこで、2024年2月時点で利用頻度の高そうな新機能、ライブラリ、ツールなどを紹介したいと思います。 この記事では広く浅く紹介することに重点を置き、各トピックについては概要のみを紹介します。詳細な使用方法に関しては各公式サイト等での確認をおすすめします。なお、本記事ではOSとしてmacOSを前提としています。 環境構築 Pythonの環境構築はpyenvとPoetryの組み合わせがもっとも標準的でしょう。 以下の手順でpyenvとPythonをインストールできます。 brew install pyenv # Bashの場合 echo 'eval "$(pyenv init -)"' >> ~/.ba

        2024年のPythonプログラミング - Uzabase for Engineers
      • uv + Ruff + mypyで構築する超軽量Python開発環境 – イメージサイズ削減・型安全性確保を実現

        はじめに ども!前回「DevContainer と uv で構築する爆速 Python 開発環境」という記事を書いた龍ちゃんです。 この記事を社内で報告したところ、上司から「リンターとフォーマッターは何を使っているの?」という質問をいただきました。確かに、せっかくパッケージマネージャーに uv を採用しているなら、同じ Astral 社が開発している Ruff で統一した方が良いですよね! ということで今回は、uv + Ruff で統一した Python 開発環境を構築してみました。さらに、ベースイメージも見直すことで、イメージサイズを 83%削減(1.63GB → 273MB)することに成功しています。 Streamlit を使ったデータ分析アプリをサンプルとして作成していますが、もちろん Streamlit 以外のプロジェクトでも利用可能です。リポジトリは公開しているので、必要な方はク

          uv + Ruff + mypyで構築する超軽量Python開発環境 – イメージサイズ削減・型安全性確保を実現
        • sqlfmtによって何を解決したいのか

          これは何 データ基盤の開発にsqlfmtを導入することについて考えてみたものです。 (チームにsqlfmtを導入するために書いてるものになります) sqlfmtによってどのような課題を解決したいのか 大きくはこれに集約されるかなと思います。 ではスタイル周りにある開発者生産性を阻害する要因とはどのようなものかというと: 読みづらいSQLによるバグの発見の遅れ ロジック周りには関係のない箇所のレビューをする必要性 SQLスタイルのスタンスの違いによる衝突 というものがあります。 これをsqlfmtならどう解決できるかを紹介します。 sqlfmtならどう解決できるか 読みづらいSQLによるバグの発見の遅れ これはそもそもformatterを導入していないことにより生じるものを想定しています。 やたらと長い一行、スペースの無い濃密な一行、揃わないインデント、無意味な改行...などにより、不用意に

            sqlfmtによって何を解決したいのか
          • GitHub - astral-sh/ruff: An extremely fast Python linter and code formatter, written in Rust.

            Docs | Playground An extremely fast Python linter and code formatter, written in Rust. Linting the CPython codebase from scratch. ⚡️ 10-100x faster than existing linters (like Flake8) and formatters (like Black) 🐍 Installable via pip 🛠️ pyproject.toml support 🤝 Python 3.13 compatibility ⚖️ Drop-in parity with Flake8, isort, and Black 📦 Built-in caching, to avoid re-analyzing unchanged files 🔧

              GitHub - astral-sh/ruff: An extremely fast Python linter and code formatter, written in Rust.
            • Vjeux » Birth of Prettier

              React Conf is around the corner and it's been almost 10 years since Prettier was released. I figured it would be a good time to recount the journey from its early days to now. This is the story of how the "Space vs Tabs Holy War" ended, not through one side winning over the other but instead a technological invention making it the underlying source of tensions no longer being a thing. Back Story S

              • Pythonの Ruff (linter) でコード整形もできるようになりました - Qiita

                要約: Flake8 + Black + isort はもうすべて Ruff だけで置き換えられる。 PythonのLinterとして、すでに Ruff を使われている方も多いと思います。Ruffは Rust で実装された高速なPython用Linterで、従来よく使われていた Flake8 に比べて数十倍短い時間で処理が終わるほか、Flake8の主要なプラグインの代替も初めから搭載されています(Lintルール一覧)。 その成功が約束されている(?)ためか、Ruff の知名度がまだ低いころから GitHub Actions公式のPythonチュートリアルは早々に Flake8 を Ruff に置き換えていました。 そして、2023年10月末にリリースされた v0.1.2 あたりから、ついにLintだけでなく、コードフォーマット(コード整形)の機能も正式に搭載されました。公式のブログ記事はこ

                  Pythonの Ruff (linter) でコード整形もできるようになりました - Qiita
                • April 2022 (version 1.67)

                  Join a VS Code Dev Days event near you to learn about AI-assisted development in VS Code. Update 1.67.1: The update addresses this security issue. Update 1.67.2: The update addresses these issues. Downloads: Windows: x64 Arm64 | Mac: Universal Intel silicon | Linux: deb rpm tarball Arm snap Welcome to the April 2022 release of Visual Studio Code. There are many updates in this version that we hope

                    April 2022 (version 1.67)
                  • Delimiter-first code

                    Summary I argue for wider usage of delimiter-first in the code three friends [tic, tac, toe] becomes three friends ・tic ・tac ・toe. A new top-level syntax for programming languages is proposed to show advantages of this method. New syntax is arguably as simple, but more consistent, better preserves visual structure and solves some issues in code formatting. Related: comma-first formatting A well-kn

                    • August 2023 (version 1.82)

                      Update 1.82.1: The update addresses this security issue. Update 1.82.2: The update addresses these issues. Update 1.82.3: The update addresses this security issue. Downloads: Windows: x64 Arm64 | Mac: Universal Intel silicon | Linux: deb rpm tarball Arm snap Welcome to the August 2023 release of Visual Studio Code. There are many updates in this version that we hope you'll like, some of the key hi

                        August 2023 (version 1.82)
                      • April 2023 (version 1.78)

                        Update 1.78.1: The update addresses this security issue. Update 1.78.2: The update addresses these issues. Downloads: Windows: x64 Arm64 | Mac: Universal Intel silicon | Linux: deb rpm tarball Arm snap Welcome to the April 2023 release of Visual Studio Code. There are many updates in this version that we hope you'll like, some of the key highlights include: Accessibility improvements - Better scre

                          April 2023 (version 1.78)
                        • Rust製の高速Linter・Formatter「Ruff」の初心者向け解説

                          RuffでPythonコードをLint・Format 会社で、同僚にPythonコードのLint(コードの静的解析)、Format(コード整形)にRuffが便利と教えてもらいました。 Pythonに関しては、ずっとLintにはFlake8を使って、VS Codeの拡張機能への組み込みとGitHub ActionsでPull Requestに対しての自動チェックを実施していました(詳細は、こちらの記事を参照ください)。 Ruffに関しては、Flake8からの乗り換えコストもあるので、わざわざ新たに覚えて使う必要はないかと思っていたのですが、調べて少し使ってみるとRuffに色々とメリットがあって、実際に使ってみて便利なことが体感できました。なので「新しいプロジェクトに関してはRuffを使っていくのがオススメ」とあっさり考えが変わりました。 ただ、Ruffを使う上で、プロジェクトで最初に私含めた

                            Rust製の高速Linter・Formatter「Ruff」の初心者向け解説
                          • Ruff

                            Ruff Docs | Playground An extremely fast Python linter and code formatter, written in Rust. Linting the CPython codebase from scratch. ⚡️ 10-100x faster than existing linters (like Flake8) and formatters (like Black) 🐍 Installable via pip 🛠️ pyproject.toml support 🤝 Python 3.13 compatibility ⚖️ Drop-in parity with Flake8, isort, and Black 📦 Built-in caching, to avoid re-analyzing unchanged fil

                            • PythonのLinter & Formatter(Flake8 + isort + Black)をRuffに置き換えたら爆速でした - KAKEHASHI Tech Blog

                              こんにちは、カケハシで Musubi 開発チームのバックエンドエンジニアをしている関です。 Musubi 開発では、 Python の Linter と Formatter に Flake8、isort、Black を使用しておりました。しかし Rust で書かれた Ruff という高性能なツールが出たということで、置き換えてみたら爆速になった(15倍以上速くなった)ので、Ruff について記事を書かせていただきます。 今回は Ruff を導入した経緯や実運用に至るまでの工程を紹介したいと思いますので、最後まで読んでいただけると嬉しいです。 Ruffとは Ruff は、2022年8月にリリースされた Rust 言語で書かれた Python の Linter 兼 Formatter です。数多くのフレームワークやライブラリで採用1されています。 Python での開発には複数のツールチェーン

                                PythonのLinter & Formatter(Flake8 + isort + Black)をRuffに置き換えたら爆速でした - KAKEHASHI Tech Blog
                              • February 2024 (version 1.87)

                                Update 1.87.1: The update addresses these issues. Update 1.87.2: The update addresses this security issue. Downloads: Windows: x64 Arm64 | Mac: Universal Intel silicon | Linux: deb rpm tarball Arm snap Welcome to the February 2024 release of Visual Studio Code. There are many updates in this version that we hope you'll like, some of the key highlights include: Voice dictation in editor - Use your

                                  February 2024 (version 1.87)
                                • VS Code の拡張機能「Dev Containers」を使いこなす!おすすめ設定10選 - 虎の穴ラボ技術ブログ

                                  こんにちは。虎の穴ラボのサカガミです。 今回は Visual Studio Code (以下 VS Code) で利用できる 拡張機能「Dev Containers」のおすすめ設定を紹介します。 Dev Containers とは? Dev Containers は、VS Code の拡張機能で、開発環境をコンテナ化することで、 開発者が統一された環境で作業できるようにするものです。 これにより、異なるマシンでの環境設定のばらつきを防ぎ、 プロジェクトの依存関係を一元管理できます。 Dev Containers を使用することで、開発者は簡単に環境を共有し、 プロジェクトに必要なツールやライブラリを容易に設定できます。 marketplace.visualstudio.com Dev Containers のメリット Dev Containers を利用することで得られる主なメリットは以下

                                    VS Code の拡張機能「Dev Containers」を使いこなす!おすすめ設定10選 - 虎の穴ラボ技術ブログ
                                  • DevelopersIO 2023 にて「AWS Lambdaは俺が作った」というタイトルで発表しました #devio2023 | DevelopersIO

                                    CX事業本部@大阪の岩田です。 2023年7月7日・7月6日に開催されたDevelopersIO 2023、2023年7月19日に開催されたDevelopersIO 2023大阪にて「AWS Lambdaは俺が作った」というテーマで登壇させて頂きました。 登壇資料 登壇資料はこちらです 「AWS Lambdaは俺が作った!!」とは? まずセッションタイトルの意味するところについての説明です。皆さんお分かりだとは思いますが、私は実際にLamdbaを作ったわけではありません。 AWS LambdaはFirecrackerによって支えられている → Firecrackerを作った人はAWS Lambdaを作った人と言えるのではないか? → FirecrackerはOSSであり、誰でもコントリビュート可能 → Firecrackerにコントリビュートすれば「AWS Lambdaは俺が作った!!」と

                                      DevelopersIO 2023 にて「AWS Lambdaは俺が作った」というタイトルで発表しました #devio2023 | DevelopersIO
                                    • July 2024 (version 1.92)

                                      Update 1.92.1: The update addresses these issues. Update 1.92.2: The update addresses these issues. Downloads: Windows: x64 Arm64 | Mac: Universal Intel silicon | Linux: deb rpm tarball Arm snap Welcome to the July 2024 release of Visual Studio Code. There are many updates in this version that we hope you'll like, some of the key highlights include: Default browser - Configure which browser to use

                                        July 2024 (version 1.92)
                                      • The AI-Native Software Engineer

                                        An AI-native software engineer is one who deeply integrates AI into their daily workflow, treating it as a partner to amplify their abilities. This requires a fundamental mindset shift. Instead of thinking “AI might replace me” an AI-native engineer asks for every task: “Could AI help me do this faster, better, or differently?”. The mindset is optimistic and proactive - you see AI as a multiplier

                                          The AI-Native Software Engineer
                                        • Python in Visual Studio Code – August 2022 Release - Microsoft for Python Developers Blog

                                          We’re excited to announce that the August 2022 release of the Python and Jupyter extensions for Visual Studio Code are now available! This release includes the following improvements: Automatic debug configurations for web apps Improvements to the Getting Started Experience Setting to configure the display of the interpreter information on the status bar A new Python Tools extension template Remov

                                            Python in Visual Studio Code – August 2022 Release - Microsoft for Python Developers Blog
                                          • VS Code で Python 用のフォーマッター (Black) を使う

                                            何をするか?Visual Studio Code に Python 拡張 を入れることで、Python コードの編集(自動補完など)ができるようになりますが、コードの自動フォーマットを行うには、フォーマッターを別途インストールしておく必要があります(いろんなフォーマッターがあるため)。 Python のフォーマッターとしては、autopep8 や yapf などもありますが、ここでは、最近人気がある Black を VS Code の自動フォーマッターとして設定します。 Facebook や Dropbox、Mozilla などでも導入されており、採用実績としては申し分なさそうです。 ☝️ 頑固なフォーマッター Black は自分自身を The uncompromising code formatter と説明しています。 ようするに、「私が定義する設定に従いなさい」という意味で、ユーザー

                                              VS Code で Python 用のフォーマッター (Black) を使う
                                            • HTML Whitespace is Broken - Devel without a Cause

                                              HTML Whitespace is Broken September 2, 2024Recently, I was working on a project which required a deeper understanding of how whitespace works in HTML. I was never a fan of HTML's whitespace behavior before as I've been burned by it a few times. But as I dug into it more deeply, I found myself discovering complex design issues that I wanted to explore in a blog post. This is partially to write down

                                                HTML Whitespace is Broken - Devel without a Cause
                                              • Python in Visual Studio Code – May 2022 Release - Microsoft for Python Developers Blog

                                                We’re excited to announce that the May 2022 release of the Python and Jupyter Extensions for Visual Studio Code are now available! With this release we’re introducing three new extensions: Black, isort, and Jupyter Powertoys. If you’re interested, you can check the full list of improvements in our changelogs for the Python, Jupyter and Pylance extensions. Black extension As mentioned before, our t

                                                  Python in Visual Studio Code – May 2022 Release - Microsoft for Python Developers Blog
                                                • The Ruff Formatter: An extremely fast, Black-compatible Python formatter

                                                  TL;DR: The Ruff formatter is an extremely fast Python formatter, written in Rust. It’s over 30x faster than Black and 100x faster than YAPF, formatting large-scale Python projects in milliseconds — all while achieving >99.9% Black compatibility. A little over a year ago, I made the first commit to Ruff, an extremely fast Python linter, written in Rust. Since then, Ruff has grown to millions of dow

                                                    The Ruff Formatter: An extremely fast, Black-compatible Python formatter
                                                  • Ruff: a fast Python linter

                                                    May 2, 2023 This article was contributed by Koen Vervloesem Linters are tools that analyze a program's source code to detect various problems such as syntax errors, programming mistakes, style violations, and more. They are important for maintaining code quality and readability in a project, as well as for catching bugs early in the development cycle. Last year, a new Python linter appeared: Ruff.

                                                    • SQLFluffを導入しました - Qiita

                                                      この記事はスタンバイ Advent Calendar 2023の16日目の記事です。 今回は、SQL LinterであるSQLFLuffについて紹介したいと思います。 SQL Linter導入の背景 筆者は職場ではデータエンジニアを担当しており、Pythonコードを書くことが多いです。Pythonプロジェクトについてはflake8やblackといったlinter・formatterを導入しています。 しかし、SQLファイルについては導入できておらず、当初はSQLを書くメンバーが限られていたためさほど問題になりませんでしたが、規模が大きくなるに連れてだんだん保守性が下がっていきました。 アナリストの方々が書いたSQLがそのままレビューに落ちてくることもあるのですが、書き方が全く違うためレビューアの立場からすると違和感を覚えるシーンもありました。 PEP8のようなコーディング規約も無いため「こ

                                                      • Black Formatter - Visual Studio Marketplace

                                                        Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter. Formatter extension for Visual Studio Code using the Black formatter A Visual Studio Code extension with support for the Black formatter. The extension ships with black=25.1.0. Note: The minimum version of Black this extension supports is 25.1.0. This extension includes support for all actively supported versions of

                                                          Black Formatter - Visual Studio Marketplace
                                                        1