Code Monkey home page Code Monkey logo

pylint-plugin's People

Contributors

alcole avatar dependabot[bot] avatar nfx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

pylint-plugin's Issues

Add checks for Spark Connect compatibility

In the current version of Spark Connect, the Spark Connect implementations of the Column and DataFrame classes aren't inherited from the corresponding classes, so the following checks will fail:

from pyspark.sql import DataFrame, Column

if isinstance(cl, Column):
  ...

if isinstance(df, DataFrame):
  ....

Making it harder to port code to UC Shared clusters and serverless notebooks/workflows...

W8912: Incompatible with Unity Catalog: from boto3 import Session (incompatible-with-uc)

Is there a way to customize what is marked as incompatible with UC and/or a way to mark a line to be skipped during the check?

One of our tasks imports boto3 to remove files from S3, but it uses secrets set on the cluster to create the session, so it's totally compatible. Come to think of it, I'm not actually sure what legacy behavior this is checking for, was boto3 used for hive metastore operations?

PS: Love the idea of this project, I was recently bit several times by inadvertent global spark variables and have been checking things manually since then, but I'll be adding this to my CI pipelines for this going forward.

Prevent implicit string concatenation

Strings like 'foo ' 'bar' resolve to 'foo bar', but are very confusing to read:

'The use of default dbfs: references is deprecated: ' '/mnt/things/e/f/g',

[FEATURE]: Align pylint-databricks plugin rules and recommendations with assessment.md and interactive assessment dashboard

Is there an existing issue for this?

  • I have searched the existing issues

Problem statement

It would be good to be consistent across detection and remediation recommendations between the newly released https://pypi.org/project/databricks-labs-pylint/ and the UCX.

Proposed Solution

Review pylint & UCX detection capabilities & recommendations, research with Product and Field Eng and change assessment.md, detection queries & views or identify changes to the databricks-labs-pylint project.

Additional Context

No response

Lint for variable extraction if the function argument is too long

Less readable:

self.reader(table_query)
.options(**self._get_jdbc_reader_options(jdbc_reader_options) | self._get_timestamp_options())

More readable:

options = self._get_jdbc_reader_options(jdbc_reader_options) | self._get_timestamp_options()
self.reader(table_query).options(**options)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.