Skip to content

Commit

Permalink
Merge branch 'version'
Browse files Browse the repository at this point in the history
  • Loading branch information
DetachHead committed Mar 29, 2024
2 parents b40c193 + 5c8ae88 commit e9e1256
Show file tree
Hide file tree
Showing 17 changed files with 449 additions and 696 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/build_and_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,21 @@ jobs:
restore-keys: |
${{ runner.os }}-node-
- run: npm run install:all
- run: ./pw pdm install

- id: current-version
run: echo ::set-output name=CURRENT_VERSION::$(node -p "require(\"./lerna.json\").version")
run: echo ::set-output name=CURRENT_VERSION::$(./pw pdm show --version)

- if: github.ref == 'refs/heads/main'
- name: get currently published npm package version
if: github.ref == 'refs/heads/main'
run: echo ::set-output name=VERSION_INFO::$(npm view $(node -p "require(\"./package.json\").name")@=${{ steps.current-version.outputs.CURRENT_VERSION }})
id: version-was-changed
working-directory: ${{ env.NPM_PACKAGE_DIR }}

- name: set version for publishing
if: github.ref == 'refs/heads/main'
run: ./node_modules/.bin/lerna version ${{ steps.current-version.outputs.CURRENT_VERSION }} --yes --no-git-tag-version

- name: Build VSIX
working-directory: ${{ env.VSIX_DIR }}
run: |
Expand Down
2 changes: 1 addition & 1 deletion docs/_sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
- [Execution Environments](configuration.md#execution-environment-options)
- [Sample pyrightconfig.json](configuration.md#sample-config-file)
- [Sample pyproject.toml](configuration.md#sample-pyprojecttoml-file)
- [Diagnostic Rule Defaults](configuration.md#diagnostic-rule-defaults)
- [Diagnostic Settings Defaults](configuration.md#diagnostic-settings-defaults)
- [Locale Configuration](configuration.md#locale-configuration)
- [Language Server Settings](settings.md)
- [Command Line Interface](command-line.md)
Expand Down
420 changes: 210 additions & 210 deletions docs/configuration.md

Large diffs are not rendered by default.

11 changes: 5 additions & 6 deletions get_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@

from json import loads
from pathlib import Path
from typing import TypedDict, cast


class LernaJson(TypedDict):
version: str
from typing import cast


def get_version() -> str:
return cast(LernaJson, loads((Path(__file__).parent / "lerna.json").read_text()))["version"]
return cast(
str,
loads((Path(__file__).parent / "packages/pyright-internal/src/version.json").read_text()),
)
20 changes: 10 additions & 10 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"packages": [
"packages/*"
],
"version": "1.7.0",
"command": {
"version": {
"push": false,
"tagVersionPrefix": "v",
"message": "basedpyright %s"
"packages": [
"packages/*"
],
"version": "1.1.356",
"command": {
"version": {
"push": false,
"tagVersionPrefix": "",
"message": "Published %s"
}
}
}
}
4 changes: 2 additions & 2 deletions packages/pyright-internal/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/pyright-internal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "pyright-internal",
"displayName": "pyright",
"description": "Type checker for the Python language",
"version": "1.7.0",
"version": "1.1.356",
"license": "MIT",
"private": true,
"files": [
Expand Down
5 changes: 5 additions & 0 deletions packages/pyright-internal/src/analyzer/checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6243,6 +6243,11 @@ export class Checker extends ParseTreeWalker {
return;
}

// If the base class is unknown, don't report a missing decorator.
if (isAnyOrUnknown(baseMember.classType)) {
return;
}

const funcNode = overrideFunction.details.declaration.node;
this._evaluator.addDiagnostic(
DiagnosticRule.reportImplicitOverride,
Expand Down
15 changes: 6 additions & 9 deletions packages/pyright-internal/src/pyright.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import { getFileSpec, tryStat } from './common/uri/uriUtils';
import { PyrightFileSystem } from './pyrightFileSystem';
import { Uri } from './common/uri/uri';
import { toolName } from './constants';
import version from './version.json';

type SeverityLevel = 'error' | 'warning' | 'information';

Expand Down Expand Up @@ -545,7 +546,7 @@ function buildTypeCompletenessReport(
minSeverityLevel: SeverityLevel
): PyrightJsonResults {
const report: PyrightJsonResults = {
version: getVersionString(),
version,
time: Date.now().toString(),
generalDiagnostics: [],
summary: {
Expand Down Expand Up @@ -796,14 +797,10 @@ function printUsage() {
);
}

function getVersionString() {
// eslint-disable-next-line @typescript-eslint/no-var-requires
const version = require('../package.json').version;
return version.toString();
}

function printVersion(console: ConsoleInterface) {
console.info(`${toolName} ${getVersionString()}`);
console.info(`${toolName} ${version}`);
// eslint-disable-next-line @typescript-eslint/no-var-requires
console.info(`based on pyright ${require('../package.json').version}`);
}

function reportDiagnosticsAsJson(
Expand All @@ -813,7 +810,7 @@ function reportDiagnosticsAsJson(
timeInSec: number
): DiagnosticResult {
const report: PyrightJsonResults = {
version: getVersionString(),
version,
time: Date.now().toString(),
generalDiagnostics: [],
summary: {
Expand Down
1 change: 1 addition & 0 deletions packages/pyright-internal/src/version.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"1.7.0"
8 changes: 4 additions & 4 deletions packages/pyright/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/pyright/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "basedpyright",
"displayName": "basedpyright",
"description": "a pyright fork with various type checking improvements, improved vscode support and pylance features built into the language server",
"version": "1.7.0",
"version": "1.1.356",
"license": "MIT",
"author": {
"name": "detachhead"
Expand Down
Loading

0 comments on commit e9e1256

Please sign in to comment.